Disable UART1 of nrf52840 DK and re-configure pins as GPIOs at runtime

Hi,

we are currently using NCS 2.0.2 on nRF52840.

Is it possible to disable uart1 via pinctrl or another library during runtime and re-configure the rx/tx as gpios?

We need to set the two pins in low-state to allow another module enter its sleep mode while the nrf stays awake.

Regards,

Simon

Parents
  • Hi Simon, 
    Which sleep mode are you looking at ? 
    If you are thinking of system OFF I do think that it's possible. You can suspend UART and then use the nrf_gpio_* library to access the pins and change the state. (see system_off sample) . The main point here is that if you are entering system OFF , it's not very important how they would work after the system OFF entered. The chip will reset and start from beginning when waking up anyway. 

Reply
  • Hi Simon, 
    Which sleep mode are you looking at ? 
    If you are thinking of system OFF I do think that it's possible. You can suspend UART and then use the nrf_gpio_* library to access the pins and change the state. (see system_off sample) . The main point here is that if you are entering system OFF , it's not very important how they would work after the system OFF entered. The chip will reset and start from beginning when waking up anyway. 

Children
Related