Feature/mspm33 rtc driver support -- WIP PR #22
Draft
Aman-Lachhiramka-ti wants to merge 14 commits intodev_mspm33from
Draft
Feature/mspm33 rtc driver support -- WIP PR #22Aman-Lachhiramka-ti wants to merge 14 commits intodev_mspm33from
Aman-Lachhiramka-ti wants to merge 14 commits intodev_mspm33from
Conversation
Rename RTC driver from mspm0 specific to a more generic msp family name to prepare for supporting multiple devices in MSP family. Driver functionality and dts bindings remain unchanged. Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
Rename dts binding from ti,mspm0-rtc to ti,msp-rtc compatible and update all references atomically. This includes binding yaml, dtsi compatible string, driver DT_DRV_COMPAT and Kconfig DT_HAS dependency to maintain bisectability. Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
Add RTC device tree node for MSPM33C321A at LFSS base address 0x400D8000 with IRQ 42. The RTC on MSPM33 is an LFSS-resident peripheral (ti,rtc-x) with dual alarm support. Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
Add board configuration and overlay for RTC API test on lp_mspm33c321a, enabling RTC with alarm support. Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
Add CONFIG_USE_MSP_DL_RTC_COMMON Kconfig symbol for mspm0 module to enable conditional compilation of dl_rtc_common.c in the HAL. Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
Add CONFIG_USE_MSP_DL_RTC_COMMON Kconfig symbol for mspm33 module to enable conditional compilation of dl_rtc_common.c in the HAL. Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
Select USE_MSP_DL_RTC_COMMON when RTC_MSP is enabled to pull in the shared dl_rtc_common.c from the HAL module. Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
Apply Zephyr clang-format style to align with upstream coding conventions. No functional changes. Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
Clean up code style and improve robustness without changing behavior. Replace __ASSERT with runtime -EINVAL checks, fix get_alarm return types to uint16_t, use K_SPINLOCK macro consistently, simplify ISR alarm pointer handling, add const to config struct, and remove unused includes. Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
Use initCalendar/getCalendarTime HAL APIs with month/year offset handling. Track time_set state to return -ENODATA before first set_time. Handle register propagation delay and RTCRDY keepout window. Support mask=0 alarm disable and initialize alarm state during init. Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
Add board overlay and platform entry to enable the RTC sample on the LP_MSPM33C321A LaunchPad. Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
Add per-second update callback using the RTCRDY interrupt. Widen IRQ guards to support both alarm and update features. Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
Add set/get calibration using the CAL register with PPB to PPM conversion. Hardware range is ±240 PPM (±240000 PPB). Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
Enable CONFIG_RTC_UPDATE and CONFIG_RTC_CALIBRATION in the rtc_api test board configuration. Signed-off-by: Aman Lachhiramka <a-lachhiramka@ti.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WIP Draft PR for initial feedback