I need to generate PWM and keep cpu in low power mode. Is it possible to wake up at time overflow interrupt and then put cpu to stop mode?
Hi tuomas aaltio,
I don't know which chip you are using, now take MKL25 as an example:
You can find in the STOP mode, async operation, the TPM is full function in PSTOP2, it can generate PWM if you don't use the interrupt. If you use interrupt, the STOP mode will be wake up.
Wish it helps you!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
current consumption is too large in partial stop 2 mode. I tried partial stop mode, but seems to be that tpm interrupt doesn't wake cpu up. Shoud it be possible to use tpm interrupt to wake us from stop mode ?
Hi tuomas aaltio,
Yes, the TPM interrupt can wake up the stop mode:
But take care, you must make sure, the clock which you are using for TPM can still work in the stop mode.
Wish it helps you!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
I got it working with
OSC0->CR |= OSC_CR_EREFSTEN_MASK;
Hi tuomas aaltio,
Please check these information from the reference manual:
So, you can use MCGPLLCLK with PLLSTEN=1, MCGIRCLK with C1[IRCLKEN]=1 and C1[IREFSTEN] =1, or OSCERCLK with EREFSTEN=1.
Wish it helps you!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------