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

Trying to shut down UART on 52840 running Zephyr

I'm using a 52840 and need both low stand by current and use of a UART. I understand that the UART drives up the power so I'm trying to completely shut it down when not being used. However, I can never find a combination of calls that lowers the power to the level that not including the UART in the prj.conf file does.

There must be a way to shut down the UART so that it no longer consumes power. Is there an example of this anywhere?  Thanks.

Doug

Parents Reply Children
  • I don't think so. I don't have a complete overview of this, but I think the UART driver is by default not low power and expects that RX is always enabled on both sides.

    The low power UART PR should fix this.

    The commands for disabling UART are (e.g. for instance 0):

    NRF_UARTE0->EVENTS_RXTO = 0;
    NRF_UARTE0->TASKS_STOPRX = 1;
    while(NRF_UARTE0->EVENTS_RXTO == 0){}
    NRF_UARTE0->EVENTS_RXTO = 0;
    NRF_UARTE0->ENABLE = 0;

    In addition, you have to set CONFIG_SERIAL=n (disable UART) in MCUboot and SPM, and set CONFIG_CONSOLE=n (unhook UART printk calls from UART) in the applications prj.conf. But I don't think this will have any effect if the instance is enabled in prj.conf (e.g. CONFIG_UART_0_NRF_UARTE=y). Could you try to test this out and see if it works or not?

    Best regards,

    Simon

Related