I am using S9KEAZN8. I would like to know how to enter low power mode. Could anyone provide a code example showing how to do this?
Also, I need to detect PWM signal changes while the MCU is in low power mode. What would be the proper way to handle this?
The Reference Manual does not have code examples. Any sample code or guidance would be appreciated.
Thanks.
Hello @ssjj
Which IDE are you using? If you are using S32DS, there are example projects available for KEA128. These examples can also be used for KEA8 with minor modifications.
If you have any other questions, please feel free to get back to me.
BR
Alice
For the S9KEAZN8, set low-power mode by setting the required clock/power configurations, and execute the appropriate WFI (Wait For Interrupt) instruction; the exact mode and wake-up sources depend on the S9KEAZN8 power-management module. For PWM monitoring, normally the MCU cannot measure PWM changes continuously when deeply asleep, so set-up an interrupt capable timer/input-capture channel or an external interrupt as the wake-up source; when an edge is detected, wake-up the MCU and use the timer/input-capture peripheral to measure the PWM period/duty cycle. Make sure to check the low-power wake-up/clock limitations of your device carefully as some peripherals and clocks are disabled in the deeper low-power modes.