LPC4337: Any way to wake up using the USART2 interrupts?

cancel
Showing results for 
Search instead for 
Did you mean: 

LPC4337: Any way to wake up using the USART2 interrupts?

335 Views
emilio_moretti
Contributor II

Hello,

I have a working USART2 that sends 16 bytes, and waits for the buffer to be empty, which triggers an interrupt, and I continue sending bytes, on an LPC4337.

It seems to work just fine when the processor is busy, but the transmission stops as soon as it enters a sleep state, and it only continues when other interrupts wake up the processor. Is there any way to make the THRE interrupt wake up the processor?

Maybe something with the event router? I was not able to find anything on the User Manual. I tried changing the interrupt priority without luck.

Thanks in advance

Labels (1)
4 Replies

259 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hello Emilio,

Unfortunately in this MCU, this is not possible, in section 10.4 Event router inputs mention the possible interruptions that can be used but the USART is not one of them.

What you could do is to notify the MCU to wake up with one of the four wake up pins.

Sorry for the inconvenience this may cause you.

Best Regards,
Alexis Andalon

0 Kudos

259 Views
emilio_moretti
Contributor II

Thank you for the reply. It confused me a lot because section 7.8 Event Router of the datasheet for parts LPC435x/3x/2x/1x it says:

Remark: Any interrupt can wake up the ARM Cortex-M4 from sleep mode if enabled in the NVIC.

This is the datasheet I'm referring to:

https://www.nxp.com/docs/en/data-sheet/LPC435X_3X_2X_1X.pdf 

Is the datasheet incorrect?

Thank you very much.

0 Kudos

259 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hello emilio.moretti@gmail.com,

Trying these different ways I couldn't wake up the MCU with only the UART interruption but what you could do is connect the RX line to one of the wake-up pins.

This way would be possible to wake the MCU even in the lowest power modes, but the first byte would not be reliable.

Best Regards,

Alexis Andalon

259 Views
emilio_moretti
Contributor II

Hello Alexis,

sadly, I can't rely on something like that. What I ended up doing was to prevent going into sleep mode when there are pending USART transactions (either send or receive).

Thank you for your time,

Emilio

0 Kudos