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

HIGH CONSUMPTION UARTE1

Hello,

I'm using NRF52840 module to make a customer device. This device send message by UART. My device is powered with a battery, for this reason I would like reduce the current consumption due to serial comunication.

 

I'm configuring serial port this way:

 

 

NRF_SERIAL_DRV_UART_CONFIG_DEF(m_uarte1_drv_config,

                      RX_PIN_NUMBER, TX_PIN_NUMBER,

                      RTS_PIN_NUMBER, CTS_PIN_NUMBER,

                      NRF_UART_HWFC_DISABLED, NRF_UART_PARITY_EXCLUDED,

                      NRF_UART_BAUDRATE_115200,

                      UART_DEFAULT_CONFIG_IRQ_PRIORITY);

 

 

#define SERIAL_FIFO_TX_SIZE 1024

#define SERIAL_FIFO_RX_SIZE 1024

 

NRF_SERIAL_QUEUES_DEF(serial1_queues, SERIAL_FIFO_TX_SIZE, SERIAL_FIFO_RX_SIZE);

 

 

#define SERIAL_BUFF_TX_SIZE 1

#define SERIAL_BUFF_RX_SIZE 1

 

NRF_SERIAL_BUFFERS_DEF(serial1_buffs, SERIAL_BUFF_TX_SIZE, SERIAL_BUFF_RX_SIZE);

 

NRF_SERIAL_CONFIG_DEF(serial1_config, NRF_SERIAL_MODE_IRQ,

                      &serial1_queues, &serial1_buffs, rec_uart_handler, sleep_handler);

 

NRF_SERIAL_UART_DEF(serial1_uarte, 1);

 

 

 

What I use is '"nrf_serial_init', and, after reading, then '"nrf_serial_uninit' to close the serial port. I am working in IRQ mode. Before and after the FIRST 'init', the current is lower than 100uA. But after the first 'read' the current is about 1.5mA. And it never goes back to 100uA even if I 'uninit' the serial port.

 

I had tried also: 

 

          NRF_UARTE1->TASKS_STOPRX = 1:

          NRF_UARTE1->TASKS_STOPTX = 1;

          NRF_UARTE1->ENABLE = 0;

 

But with no success.

 

 

Is there any function or macro, to get back to low power (<100uA) after the reading process?

Any help is wellcome. Thank you in advance.

 

 

Thank you!!!

Parents Reply Children
  • Hi Simon!!

    I'm using nRF5 SDK for Thread v0.11.0.

    I saw that solution, and I tried it, this is the part of my code:

                          nrf_serial_uninit(&serial1_uarte);
                            *(volatile uint32_t *)0x40028FFC = 0;   // Power down UARTE1
                            *(volatile uint32_t *)0x40028FFC;       //     
                            *(volatile uint32_t *)0x40028FFC = 1;   // Power on UARTE1 so it is ready

    I tried too this:

     nrf_serial_uninit(&serial1_uarte);
                          NRF_UARTE1->TASKS_STOPRX=1;
                          NRF_UARTE1->TASKS_STOPTX=1;
                          NRF_UARTE1->ENABLE=0;
                            *(volatile uint32_t *)0x40028FFC = 0;   // Power down UARTE1
                            *(volatile uint32_t *)0x40028FFC;       //     
                            *(volatile uint32_t *)0x40028FFC = 1;   // Power on UARTE1 so it is ready

    But it's not success, The consumption is the same.

    In this moment I don't know what can I try...

    Thank you in advance!

Related