This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Uninitialising libuarte does not turn off EasyDMA, causing high current draw in sleep.

I am looking to use libuarte in our project. We are creating a battery powered device and so need to be low powered. EasyDMA draws about 1mA when running which is far too high.

The idea to get around this is to only enable the UARTE (and thus EasyDMA) when comms are required.

Currently I am just using the libuarte example project to test the power usage. I have modified the example to call nrf_libuarte_async_uninit() and then sleep once the Tx has finished. This still draws about 1mA of current even when sleeping, whereas, if I never initialise libuarte to start with then I get about 3uA!

This seems that EasyDMA is never actually being disabled when uninitialising the UARTE. I guess this is related to this known bug, however, this workaround is for the TWIM and SPIM.

My question is: how can I disable EasyDMA when it is not in use?

Parents Reply Children
  • Thank you Stian. That did seem to fix the problem with not sleeping. I had to manually patch the changes as v2.x.x of the HAL is not compatible with SDK v17.

    Do you know of a way to reduce the 1mA drain of the UARTE? We need to be low powered so 1mA for a UART isn't really ideal. We would like to wake up on received data and then send a single response and then sleep again, this is not constant comms and so we don't need to always be active. The only way I can see to do this with the UARTE is to uninit the UARTE when not in use and instead enable a GPIOTE interrupt on the Rx line, then when we get data we enable the UARTE again to read the message. This is not great because the other device needs to wait until we're fully awake before sending it's message otherwise we get framing errors.

Related