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

nrf9160 uart Pull-Up and power consumption

hi all,

i'm trying to disable uart for lower power consumption, i've disables it with:

NRF_UARTE1->TASKS_STOPTX = 1;
NRF_UARTE1->TASKS_STOPRX = 1;


but when i measure the voltage on the rx pin i see 1.8V  (this seems to consume current on the device on the other side of the uart interface - which is turned off )
i assume its in pulled up state, so i'm trying to change it's state to no-pull:
nrf_uarte_txrx_pins_disconnect(NRF_UARTE0);
gpio_pin_configure(uart_wifi, 18, GPIO_PUD_PULL_DOWN);
gpio_pin_configure(uart_wifi, 19, GPIO_PUD_PULL_DOWN);
gpio_pin_write(uart_wifi, 18,0);
gpio_pin_write(uart_wifi, 19,0);

 but it doesnt seem to have any effect.

how can i set this pin to 0, and back to 1 when I need it , on runtime?

Thanks

Moshe

Parents Reply
  • Hi,

      

    MosheSmartAmr said:
    also how do I re-enable uart after the code you suggested above.

     You store the INTENCLR mask, then set that via INTENSET, and the same goes to all other parameters that are "unset" from the disable function. Note that you strictly do not need to clear the PSEL registers. Then you start the TX and RX via its respective tasks.

     

    There are events that can be generated when entering/exiting sleep, in the POWER peripheral:

    https://infocenter.nordicsemi.com/topic/ps_nrf9160/power.html?cp=2_0_0_4_2_0

    However; they are not really meant to enable interrupts on, as that would again wake you up, thus it'll defeat the purpose if you hook onto these events to do CPU processing. They are however very useful to see how often the CPU sleeps if you set/clear a GPIO on these events via PPI and GPIOTE, and look at it using a logic analyzer.

     

    Kind regards,

    Håkon

Children
Related