How do I power off the UART

I have a nRF9160 board that is running off batteries. I need to conserve power and I would like to power off the UART. In the field I do not need any printouts or listening to keystrokes. How do I completely power off the UART? There will not be a terminal connected in the field. The terminal would only be used at the factory for configuring the boards and saving the configuration to Flash.

Parents Reply Children
  • Achim - I tried the static method by setting CONFIG_SERIAL=n in prj.conf and I got the following repeatedly.

    *** Booting Zephyr OS build v2.6.99-ncs1 ***
    I: Starting bootloader
    I: Primary image: magic=good, swap_type=0x2, copy_done=0x1, image_ok=0x1
    I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Boot source: none
    I: Swap type: none
    I: Bootloader chainload address offset: 0x10000
    *** Booting Zephyr OS build v2.6.99-ncs1 ***
    I: Starting bootloader
    I: Primary image: magic=good, swap_type=0x2, copy_done=0x1, image_ok=0x1
    I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
    I: Boot source: none
    I: Swap type: none
    I: Bootloader chainload address offset: 0x10000

    I tried the dynamic message and I got the following message

    ../src/jfet_files/jfet_init.c: fatal error: power_manager.h: No such file or directory

    any idea what I am missing or doing wrong in either case?

  • > v2.6.99-ncs1

    I use NCS 2.1.2 with v3.1.99-ncs1-1. I'm not sure, what that older version offers.

    > CONFIG_SERIAL=n

    I guess your code access that device "unconditional".

    > ../src/jfet_files/jfet_init.c: fatal error: power_manager.h: No such file or directory

    I guess, that requires a newer version, e.g. NCS 2.1.2

    Anyway, for a fast solution without update to NCS 2.1.2, I would recommend, that you try one of the samples, e.g. blinky with CONFIG_SERIAL=n and see, if that works. Or the nrf9160 udp sample.

    If so, the try to find, where your code access the uart.

    If the blinky doesn't work, then I'm not sure, if that's related to OS version.

Related