Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stm32 rtc driver using the stm32 LL_RTC Time Date init functions #72880

Merged
merged 3 commits into from
May 24, 2024

Conversation

FRASTM
Copy link
Collaborator

@FRASTM FRASTM commented May 16, 2024

Use the LL_RTC_TIME_Init and LL_RTC_DATE_Init and
let the LL functions manage the Enter init mode and the Write Protection of the RTC calendar Registers

Increase the Timeout when executing the tests/drivers/rtc/rtc_api on stm32 targets
This will let test ends correctly when waiting for the alarm flags

Fixes #72888

Copy link
Collaborator

@ajarmouni-st ajarmouni-st left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please put the modifs related to RTC alarm in a separate commit?

drivers/rtc/rtc_ll_stm32.c Show resolved Hide resolved
drivers/rtc/rtc_ll_stm32.c Outdated Show resolved Hide resolved
@FRASTM FRASTM force-pushed the stm32_rtc branch 3 times, most recently from 98cad92 to 90fa268 Compare May 21, 2024 14:22
@FRASTM
Copy link
Collaborator Author

FRASTM commented May 21, 2024

rebase on ec0e2d6

drivers/rtc/rtc_ll_stm32.c Outdated Show resolved Hide resolved
@FRASTM FRASTM marked this pull request as draft May 21, 2024 15:52
@FRASTM FRASTM force-pushed the stm32_rtc branch 4 times, most recently from 592db1d to 8943913 Compare May 22, 2024 07:25
@FRASTM FRASTM marked this pull request as ready for review May 22, 2024 07:31
@FRASTM FRASTM requested a review from ajarmouni-st May 22, 2024 07:31
ajarmouni-st
ajarmouni-st previously approved these changes May 22, 2024
gautierg-st
gautierg-st previously approved these changes May 22, 2024
@FRASTM FRASTM marked this pull request as draft May 22, 2024 09:44
@FRASTM FRASTM marked this pull request as ready for review May 22, 2024 11:22
Add a timeout to the tests/drivers/rtc_api testcase so twister
can end properly when running with twister.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
Set a Calendar using the LL functions LL_RTC_TIME_Init
and LL_RTC_DATE_Init. Add more DBG info
On the stm32F2 serie, check RS Flag after setting calendar registers.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
Note that the Init of the alarm has no need for BCD2BIN conversion,
the LL_RTC_ALMx_Init will do. Add more log debug
The driver must clear the ALARM enable bit before wrting the alarm
registers.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
@MaureenHelm MaureenHelm merged commit 6db2c2c into zephyrproject-rtos:main May 24, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: RTC Real Time Clock platform: STM32 ST Micro STM32
Projects
None yet
Development

Successfully merging this pull request may close these issues.

stm32f207 fails executing the tests/drivers/rtc/rtc_api
6 participants