Issue with uart NRF_UART0->ENABLE = 1

08 Oct 2018

Hello

I have an issue with NRF52832 / mbed-os 5.10 where the current consumption when I enable the Serial port via Serial pc(USBTX, USBRX, 115200); is not reduced when entering sleep.

The only way I can achieve normal low consumption sleep is to use the following command NRF_UART0->ENABLE = 0;

However when I do this I cannot get the serial port to work again on wake, even with NRF_UART0->ENABLE = 1; Whenever i try to printf the main thread (with printf) hangs, so its getting stuck on that command. I have the hwfc disabled in the mbed_app.json.

What am i missing, how can I reliably disable the uart before sleep, and then re-enable it when i need to use?

I guess really im expecting some kind of mbed-os command which is the opposite to Serial pc(USBTX, USBRX, 115200); and closes the uart ready for sleep.

Thanks!

16 Oct 2018