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

How to disable and enable UART at runtime?

I want to disable and enable UART at runtime. I don't use DMA and interrupt.

I read this thread.
https://devzone.nordicsemi.com/f/nordic-q-a/52496/nrf9160-uart-pull-up-and-power-consumption/216096#216096

I tried this code but doesn't work. Any help?

Thanks!

Parents
  • Hi Yusuke,

    Have you tried one of the other UARTS instead, like in the thread you linked to?

    Do you have a logic analyzer to actually connect to the pins appointed to the UART pins?

Reply
  • Hi Yusuke,

    Have you tried one of the other UARTS instead, like in the thread you linked to?

    Do you have a logic analyzer to actually connect to the pins appointed to the UART pins?

Children
  • This works out.

    However, when I add these lines to the above disable_uart, it fails. Why?

  • Hi Yusuke,

    Wouldn't it make more sense to have the two lines at the end of disable_uart?

    e.g.



    Best regards,

    Martin L.