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

nrf9160 serial port deactivate for low power

Hello,

I am using the nrf9160 DK board ver 0.9.0 running the latest version of the asset tracker application. I am wanting to switch the serial ports off to measure the sleep current which is currently approx 1mA. After reading various posts I have added CONFIG_SERIAL=n to both the prj.conf files in the application/asset tracker and samples/nrf9160/spm folders. This seems to be all that is required to disable the uarts (?). I have also enabled power optimization.

Without any other changes I am now getting uart related build errors:


modules/nrf/lib/at_host/lib..__nrf__lib__at_host.a(at_host.c.obj): in function `uart_irq_rx_enable':
undefined reference to `z_impl_uart_irq_rx_enable'
modules/nrf/lib/at_host/lib..__nrf__lib__at_host.a(at_host.c.obj): in function `uart_irq_update':
undefined reference to `z_impl_uart_irq_update'
modules/nrf/lib/at_host/lib..__nrf__lib__at_host.a(at_host.c.obj): in function `isr':
undefined reference to `uart_irq_rx_ready'
c:/gnuarmemb/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Nordic_SDK/ncs/nrf/lib/at_host/at_host.c:211: undefined reference to `uart_fifo_read'
modules/nrf/lib/at_host/lib..__nrf__lib__at_host.a(at_host.c.obj): in function `uart_irq_rx_disable':
undefined reference to `z_impl_uart_irq_rx_disable'
modules/nrf/lib/at_host/lib..__nrf__lib__at_host.a(at_host.c.obj): in function `at_uart_init':
undefined reference to `uart_fifo_read'
c:/gnuarmemb/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/Nordic_SDK/ncs/nrf/lib/at_host/at_host.c:250: undefined reference to `uart_irq_callback_set'
modules/nrf/lib/at_host/lib..__nrf__lib__at_host.a(at_host.c.obj): in function `uart_irq_rx_enable':
undefined reference to `z_impl_uart_irq_rx_enable'
ld returned 1 exit status
B 2 KB 5.08%
Build failed

There are a number of older posts (over a year) that mention additional steps to turn the serial ports off. I have tried a number of these without success. Any help would be appreciated.

Thanks, Peter

Related