When the power consumption mode is switched, the receiving of the serial port is affected. The serial port uses the interrupt mode. Even the switch from RUN to RUN also affects the receiving of the serial port. What's the matter?Can anybody help me?thank you very much.
The power manager switches the system clock (in run modes) as you can see below, therefore, it does affect the performance of every peripheral, and it disables the system clock in stop modes. .
But, if the MCU is in RUN mode already, the driver does not switch the mode:
Could you elaborate on how exactly it affects the LPUART in your application?
Regards,
Daniel
I see that you are disabling the interrupt before it switches to RUN.
If you want to disable interrupts before the MCU switches power modes, you can mask them.
s32_core_cm4.h
DISABLE_INTERRUPTS()
ENABLE_INTERRUPTS()
BR, Daniel
like abve code,I use uart0 interrupt in this way,after I send change power mode command several times,uart0 goes wrong.