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 Children
  • 1514 void disable_uart(){
    1515         NRF_UARTE0->TASKS_STOPTX = 1;
    1516         NRF_UARTE0->TASKS_STOPRX = 1;
    1517         NRF_UARTE0->ENABLE= UARTE_ENABLE_ENABLE_Disabled;
    1518 
    1519         NRF_UARTE1->TASKS_STOPTX = 1;
    1520         NRF_UARTE1->TASKS_STOPRX = 1;
    1521         NRF_UARTE1->ENABLE= UARTE_ENABLE_ENABLE_Disabled;
    1522 
    1523         NRF_UARTE0_NS->TASKS_STOPTX = 1;
    1524         NRF_UARTE0_NS->TASKS_STOPRX = 1;
    1525         NRF_UARTE0_NS->ENABLE= UARTE_ENABLE_ENABLE_Disabled;
    1526 
    1527         NRF_UARTE1_NS->TASKS_STOPTX = 1;
    1528         NRF_UARTE1_NS->TASKS_STOPRX = 1;
    1529         NRF_UARTE1_NS->ENABLE= UARTE_ENABLE_ENABLE_Disabled;
    1530         
    1531         nrf_uarte_txrx_pins_disconnect(NRF_UARTE0);                                                                                                               
    1532         nrf_uarte_txrx_pins_disconnect(NRF_UARTE1);
    1533         nrf_uarte_txrx_pins_disconnect(NRF_UARTE0_NS);
    1534         nrf_uarte_txrx_pins_disconnect(NRF_UARTE1_NS);
    1535 
    1536         nrf_uarte_disable(NRF_UARTE0);
    1537         nrf_uarte_disable(NRF_UARTE1);
    1538         nrf_uarte_disable(NRF_UARTE0_NS);
    1539         nrf_uarte_disable(NRF_UARTE1_NS);
    1540 
    1541 
    1542 }

    this is the code we have used . 

    it seems that it is in the right order.

  • Yes, it seems correct to me. So I don't see how the RX line could be 1.8v when the ext. device is powered off. But you mentioned that the external device seems to draw current. Did you determine that based on the total current consumption? 

  • Hi Vidar , 

    >> Did you determine that based on the total current consumption? 

    yes, I did.

    How can I further debug this issue? 

  • Could you let me know the current consumption you see is? Here are some things you can try:

    - Verify GPIO pin configuration RX and TX by reading out the configuration registers with your debugger. Also, the pin that controls the power to the external device if you use an output pin for it.

    - If possible, get a baseline measurement by measuring the current consumption before enabling UARTE and power to external circuitries.  

    - Check the enable registers for all UART instances. 

  • Hi,

    1. current consumption is around 1ma.

    2. Verified the GPIO's from the register and they look ok, the pins that contols the external device I measured the voltage and it looks corrct.

    3. checked the ENABLE , they look ok . 

Related