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

nrf52832 Taking power on UART Lines

nrf52832 is connected to the main controller of the circuit on uart lines (RX and TX).
We have observed that even when we completely cut-off the power of nrf52832 then also it does not switch off. And it continues to be and running. And it draws power from the main controller through UART lines. Is this normal behavior? What can be done to avoid this?
Thnx for the help
Parents Reply Children
  • Yes sure. 

    Setup: one nrf52832 Development board.

    Content of main()

    int main(void)
    {

    log_init();   timer_init();   uart_init();
    db_discovery_init();  power_management_init();
    ble_stack_init();   gatt_init();  nus_c_init();  scan_init();
    gpio_init();

    nrf_gpio_input_disconnect(8); // disconnect RX
    nrf_gpio_input_disconnect(6); // disconnect TX

    app_timer_init();
    app_timer_create(&testtimer,APP_TIMER_MODE_SINGLE_SHOT,timerfunction);

    for (;;)
    {
    idle_state_handle();
    }
    }

    I have configured an interrupt on PIN 11 and a one-shot timer (of 5 sec ) is started once interrupt is received.

    Interrupt callback function:

    void in_pin_handler1(nrf_drv_gpiote_pin_t pin, nrf_gpiote_polarity_t action)
    {
    nrf_gpio_cfg_watcher(8);   // Enable RX
    nrf_gpio_cfg_watcher(6);  // Enable TX

    printf("BLE");
    scan_start();
    app_timer_start(testtimer, 5*32768, NULL);

    }

    Timer callback function:

    static void timerfunction(void * p_context)
    {
    UNUSED_PARAMETER(p_context);


    nrf_gpio_input_disconnect(8);   // Disconnect RX
    nrf_gpio_input_disconnect(6);   // Disconnect TX

    nrf_ble_scan_stop();
    printf("\r\n");
    }

    In the above setup: the UART lines should only active when the timer is running for 5 seconds after receiving interrupts. But the UART lines are always active. 

    To know the state of UART lines:

    In the function :

    uart_event_handle(app_uart_evt_t * p_event)

    I have included a printf statement.  (printf("uart_event_handle"))

    The above print statement should only get executed while the timer is running but no matter if the timer is running or not, I always get the print statement if i send some data to nrf.

    Hope it clarifies the issue

  • maybe just turn off external UART interface and set pin to low 

  • turn off external UART interface

    Do you mean NRF's UART? How to do this for NRF?

Related