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

Renesas: Smartbond: RTC Driver Update #72817

Merged

Conversation

ioannis-karachalios
Copy link
Contributor

This PR should fix few RTC driver issues and add support to the RTC test suite.

@zephyrbot zephyrbot added area: RTC Real Time Clock platform: Renesas SmartBond Renesas Electronics Corporation, SmartBond labels May 15, 2024
@ioannis-karachalios ioannis-karachalios force-pushed the da1469x-rtc-update branch 3 times, most recently from f0ae9b5 to 0abc423 Compare May 15, 2024 17:50
Copy link
Collaborator

@bjarki-trackunit bjarki-trackunit left a comment

Choose a reason for hiding this comment

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

You could introduce the shared util

bool rtc_utils_validate_rtc_time(const struct rtc_time *timeptr, uint16_t mask);
to validate the alarm fields before setting them as well

This commit should fix the followings:
1.  When an alarm event is initialized, the driver should only
    consume the valid alarm fields, based on the given mask.
    Otherwise, the driver should use default valid subfield
    values.
2.  Setting an alarm event should not return with error code
    if the timer and/or calendar counters have yet to be
    initialized, explicitly. Instead, a log warning should be
    issued.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
This commit should add support for the DA1469x Pro DevKit.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
@ioannis-karachalios
Copy link
Contributor Author

You could introduce the shared util ...

Done. The RTC controller should detect invalid alarm fields and API should return with -EINVAL. However, it should be more efficient to use the mentioned utility before accessing the RTC alarm registers.

Copy link
Collaborator

@bjarki-trackunit bjarki-trackunit left a comment

Choose a reason for hiding this comment

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

Looks good :)

@MaureenHelm MaureenHelm merged commit d9a49cb into zephyrproject-rtos:main May 17, 2024
21 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: Renesas SmartBond Renesas Electronics Corporation, SmartBond
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants