-
Notifications
You must be signed in to change notification settings - Fork 8.1k
infineon: Psc3m5 counter #95870
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
infineon: Psc3m5 counter #95870
Conversation
5ba429c
to
c5141f3
Compare
c5141f3
to
295c461
Compare
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.
This should really be added to the counter API test.
Would be great to see some test coverage on the neat tricks being used for counter_is_bit_mask, counter_ticks_add, counter_ticks_sub functions which look well done but took a moment to read and understand. Some tests would make it easier to ensure the edge scenarios are covered and stay covered over time.
I'm unsure the likely() to shortcut masking bits when the top value is a 2^n-1 is worth while, but you likely know better than me, and its a neat how its done.
I'm not super familiar with tcpwm IP but if it can do counter capture (capture the count on a gpio trigger) there's a PR from @XenuIsWatching in #89127 that might be worth watching and implementing.
295c461
to
4a7a8b5
Compare
4a7a8b5
to
d3b2761
Compare
I added the counter API test. We will address you other suggestions with future pull requests. |
@billwatersiii Please leave comments resolving to reviewers. |
7a9b6ac
to
c38b4ac
Compare
c38b4ac
to
eb80e33
Compare
platform related change, assign to platform maintainer. |
8e5d597
to
a020aa3
Compare
- Add a new counter driver implementation based on the PDL for Infineon CAT1B devices. This enables support for hardware counters on the PSC3M5 platform. - Add IFX_TCPWM_Counter_DeInit and IFX_TCPWM_Counter_Init macros to include/zephyr/drivers/timer/ifx_tcpwm.h and sort all of the macros in that file Signed-off-by: Yurii Lozynskyi <[email protected]>
Enable the alarm sample for the kit_psc3m5_evk Signed-off-by: Bill Waters <[email protected]>
Enable the counter test for the kit_psc3m5_evk Signed-off-by: Bill Waters <[email protected]>
a020aa3
to
27d7139
Compare
|
Add psc3m5 counter driver:
Infineon CAT1B devices. This enables support for hardware
counters on the PSC3M5 platform.
macros to include/zephyr/drivers/timer/ifx_tcpwm.h
and sort all of the macros in that file