Wake on UART RX

Hello all,

Had a quick question for you today. I have an application where I have to achieve the maximum possible sleep efficiency. To do that, I’d like to sleep the system right up until UART data is received, parse that data, then go to sleep again.

I’ve seen others say one way to do it is to configure a change interrupt for the rx pin, but I understand this technique sometimes misses the first byte, which I don’t have the luxury of doing.

Any suggestions on how best to tackle this?

@nmcc Do you happen to have any wisdom to add? Apologies for tagging you directly, but you’ve been a great help in the past, wondering if you had something for this as well.

Which product did you have in mind and do you really mean RUI or RUI3?

Sorry for the ambiguity, talking about RUI3 here with the RAK4630-R stamp module. It’ll be on a custom board but nothing really fancy on the UART side. Programmed with the Arduino IDE

@nmcc @carlrowan sorry for the tags, but I’m fretting over this issue. Any advice? If not, I can close this post

I’ve read some more documentation that says that the UART peripheral may stay active during some sleep modes, which is exactly what I need for this application. Can you confirm that UART stays active during one of the sleep modes I can call with RUI3?

Hi @cmod ,

UART peripheral is not active during sleep. This is to fully minimize current consumption but you can trigger wake on specific IO pin also on UART RX. So basically, you can wake up the device whenever you send anything via UART. Btw, you are using the module with external MCU right? Not as an independent board via RUI3 API?

For this application the only microcontroller module is the RAK4630, I don’t have an external MCU on the same board.

Is there any way that a sleep mode can be attained that DOESN’T sleep the UART peripheral? I’m afraid of missing a byte or two coming out of sleep.

I see. Hmm. I am afraid we do not have that sleep mode where UART peripheral is on. If you have control on the external device/sensor where you communicate via UART, maybe you can have a trigger first before getting the needed data. Just to be sure that the device is fully away before doing any UART read.

Unfortunately I have no such control over the target device, as it’s a 3rd party device I am interfacing with.

Is this functionality available elsewhere outside of RUI3? Perhaps if I used the older Arduino API? Is it possible to directly call the Nordic SDK to do sleep?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.