-
Notifications
You must be signed in to change notification settings - Fork 8.4k
drivers: hwinfo: cc23x0: Add support for cc23x0 in hwinfo #89508
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
drivers: hwinfo: cc23x0: Add support for cc23x0 in hwinfo #89508
Conversation
a53fe97 to
2f3f683
Compare
alexanderwachter
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds hardware info support for the cc23x0 family by implementing two new functions to retrieve supported reset causes and the current reset cause for the device.
- Introduces z_impl_hwinfo_get_supported_reset_cause with combined bit flags.
- Implements z_impl_hwinfo_get_reset_cause using PMCTLGetResetReason() and a switch-case.
Files not reviewed (2)
- drivers/hwinfo/CMakeLists.txt: Language not supported
- drivers/hwinfo/Kconfig: Language not supported
2f3f683 to
6b92c02
Compare
| case PMCTL_RESET_LOCKUP: | ||
| *cause = RESET_CPU_LOCKUP; | ||
| break; | ||
| default: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe a few more reset causes are supported:
- PMCTL_RESET_LFXT (LFXT clock loss) for RESET_CLOCK
- PMCTL_RESET_SYSTEM (Software triggered reset) for RESET_SOFTWARE
- PMCTL_RESET_TSD (Device woke up from thermal shutdown after temperature drop) for RESET_TEMPERATURE
- PMCTL_RESET_SWD (Device reset triggered by Serial Wire Debug reset event) for RESET_DEBUG
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- PMCTL_RESET_LFXT (LFXT clock loss) for RESET_CLOCK
I was not exactly sure , if this case is exact match. If you think it is I am adding it.
- PMCTL_RESET_SYSTEM (Software triggered reset) for RESET_SOFTWARE
This is already implemented
- PMCTL_RESET_TSD (Device woke up from thermal shutdown after temperature drop) for RESET_TEMPERATURE
I was not exactly sure , if this case is exact match. If you think it is I am adding it.
- PMCTL_RESET_SWD (Device reset triggered by Serial Wire Debug reset event) for RESET_DEBUG
Missed it because there was already SWD case - added now.
6b92c02 to
230446a
Compare
|
Added couple more supported reset reasons as requested. PR is rebased and on latest main , since force push was required. |
Add support for get_reset_cause and get_supported_reset_cause. Signed-off-by: Stoyan Bogdanov <sbogdanov@baylibre.com>
230446a to
1e52d3e
Compare
alexanderwachter
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Add hwinfo support for get_reset_cause and get_supported_reset_cause.
Datasheet: https://www.ti.com/lit/ds/symlink/cc2340r5.pdf