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

Problems with UARTE on nRF52832

To reduce power consumption during sleep I have to completely disable the UARTE0. This is done before sleeping by : 

NRF_UARTE0->TASKS_STOPRX = 1;
NRF_UARTE0->ENABLE = UARTE_ENABLE_ENABLE_Disabled << UARTE_ENABLE_ENABLE_Pos;

At this point, there is no TX operation in progress.

When waking up I do the following :

NRF_UARTE0->ENABLE = UARTE_ENABLE_ENABLE_Enabled << UARTE_ENABLE_ENABLE_Pos;
NRF_UARTE0->TASKS_STARTRX = 1;

Problem is that the UART suddenly stops receiving after the first sleep. Prior to the first sleep it receives as expected, but

after the first sleep it just stops receiving. Transmitting works just fine.

Anyone experienced anything similar ?

  • Hi,

     

    Could you try waiting for the RXTO event before disabling, like described in the "Reception" part of the PS and see if it works after wakeup?

    The STOPTX and STOPRX tasks may not be always needed (the peripheral might already be stopped), but if STOPTX and/or STOPRX is sent, software shall wait until the TXSTOPPED and/or RXTO event is received in response, before disabling the peripheral through the ENABLE register.

     

    Best regards,

    Håkon

Related