nRF52832 is not going to Deep Sleep Mode

Hello,

I am working with nRF52832 and want to put it to sleep and wake it up with a interrupt from a GPIO. I am using a accelerometer LIS3DH to generate the interrupt. I am following the System OFF example from Zephyr Samples. I am using it without retention.

Link to example: https://github.com/zephyrproject-rtos/zephyr/blob/main/samples/boards/nrf/system_off/src/main.c

The device is not going to sleep as I can observe 30mA continuous current consumption. 

Attaching my custom board and code. 

Please verify the code. 

Regards,

Sri

6683.Firmware.zip

Parents
  • Few things, 

    1. Hundreds of users have used LIS3DH sensor with nrf52832, and it works just fine. No issues with hardware or drivers.
    2. 30mA power consumption does not sound right, I do not think that our SoC can consume that much. Check if you are working on the custom board and if the board is designed right.
    3. Connect the pins of the LIS3DH to the logic analyzer or similar and see if there is any data coming out of it or not. If there is no valid data from the sensor, then check if it is configured correctly.
Reply
  • Few things, 

    1. Hundreds of users have used LIS3DH sensor with nrf52832, and it works just fine. No issues with hardware or drivers.
    2. 30mA power consumption does not sound right, I do not think that our SoC can consume that much. Check if you are working on the custom board and if the board is designed right.
    3. Connect the pins of the LIS3DH to the logic analyzer or similar and see if there is any data coming out of it or not. If there is no valid data from the sensor, then check if it is configured correctly.
Children
  • I am trying to compile the System Off example by creating a new application from sample. I have made a custom board for nRF52832 and created board files for the board following the Dev Academy Exercise. When compiling the example code getting below error:

    c:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: app/libapp.a(main.c.obj): in function `main':
    C:/Harsha/Echotag/Firmware/system_off/src/main.c:75: undefined reference to `__device_dts_ord_70'
    collect2.exe: error: ld returned 1 exit status
    ninja: build stopped: subcommand failed.

    Can you please verify the error and suggest me a way to overcome it.

    PFA the code and the custom board created

    Regards,

    Sri

    Customboard.zip

    4572.system_off.zip

  • undefined device tree nodes are simple to debug. You just follow the instructions mentioned here.

    Most of the time it is just a missing or misconfigured device node.

    In the <build>/zephyr/include/generated/devicetree_generated.h., node 70 is as below

     *   70  /soc/uart@40002000

    So uart does not seem to be enabled in the device tree in your board files. I added this in your custom board overlay filed

    &uart0 {
    	status = "okay";
    };

    and added these in the prj.conf file

    # Enable the UART driver
    CONFIG_UART_ASYNC_API=y
    CONFIG_NRFX_UARTE0=y
    CONFIG_SERIAL=y

    This fixes the device tree error.

  • Thank you Susheel. I will make the appropriate changes.

Related