20220318
From Wiki at Neela Nurseries
2022 Thursday March 17 Power Profile capture, from 45 second (partial) firmware sleep test:
prj.conf file:
##====================================================================== ## prj.conf file for Zephyr app based on Nordic aws_iot sample app ##====================================================================== # General config CONFIG_NCS_SAMPLES_DEFAULTS=y CONFIG_REBOOT=y # NEWLIB C CONFIG_NEWLIB_LIBC=y CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y # low power related efforts: # Ref https://devzone.nordicsemi.com/f/nordic-q-a/81744/nrf9160-deep-sleep-power-consumption-help/341928#341928 CONFIG_DEVICE_POWER_MANAGEMENT=y # Per Jared Wolff https://community.jaredwolff.com/d/222-nrf9160-sleep-and-low-power-control-areas CONFIG_PM_DEVICE=y CONFIG_PM_DEVICE_RUNTIME=y ## REF https://devzone.nordicsemi.com/f/nordic-q-a/46083/how-to-setup-zephyr-for-rtt-logging-with-nrf9160 CONFIG_UART_CONSOLE=n # REF https://devzone.nordicsemi.com/f/nordic-q-a/85435/possible-to-fully-turn-off-uart-from-zephyr-based-application # Enable RTT CONFIG_USE_SEGGER_RTT=y # Send log over RTT CONFIG_LOG_BACKEND_RTT=y #(Optionally also CONFIG_LOG_BACKEND_UART=n, you'll probably get some Kconfig warnings without) # Send printk/printf over RTT CONFIG_RTT_CONSOLE=y #(Optionally also CONFIG_UART_CONSOLE=n) # Network CONFIG_NETWORKING=y CONFIG_NET_NATIVE=n # LTE link control CONFIG_LTE_LINK_CONTROL=y CONFIG_LTE_NETWORK_MODE_LTE_M=y CONFIG_LTE_AUTO_INIT_AND_CONNECT=n # Modem library CONFIG_NRF_MODEM_LIB=y CONFIG_NRF_MODEM_LIB_SYS_INIT=n # AT Host CONFIG_UART_INTERRUPT_DRIVEN=y CONFIG_AT_HOST_LIBRARY=y # AWS IoT library CONFIG_AWS_IOT=y CONFIG_AWS_IOT_CLIENT_ID_STATIC="mmm" CONFIG_AWS_IOT_BROKER_HOST_NAME="a.b.c.com" CONFIG_AWS_IOT_SEC_TAG=00000000 ## 2022-02-28 - effort to decouple from AWS IoT library threads, use our own - TMH ## Note symbol AWS_IOT_CONNECTION_POLL_THREAD defined in ncs/nrf/subsys/net/lib/aws_iot/Kconfig, ## and defaults to 'y'. Override that default value here, and enable ## Kconfig replacement symbol to support decoupling of AWS IoT library functions from Nordic sample app library: CONFIG_AWS_IOT_CONNECTION_POLL_THREAD=n CONFIG_CUSTOM_APP_CONNECTION_POLL_THREAD=y # 2021-12-14 TUE - adjusting up from 2 to 3, normally set to 2 in Nordic aws_iot sample app: # ## NOTE this value must match the number of MQTT topics to which custom ## firmware application subscribes, otherwise segmentation fault occurs ## upon call to AWS IoT client diconnect function - TMH # CONFIG_AWS_IOT_APP_SUBSCRIPTION_LIST_COUNT=5 # 2022-02-04 Ted changing following 1, 3 and 4 from 'y' to 'n': # (1) CONFIG_AWS_IOT_TOPIC_UPDATE_DELTA_SUBSCRIBE=n # (2) CONFIG_AWS_IOT_LAST_WILL=y # (3) CONFIG_AWS_IOT_TOPIC_GET_ACCEPTED_SUBSCRIBE=n # (4) CONFIG_AWS_IOT_TOPIC_GET_REJECTED_SUBSCRIBE=n # 2022-02-04 MQTT client pull in work, refactoring related: CONFIG_AWS_IOT_AUTO_DEVICE_SHADOW_REQUEST=n ORKQUEUE_STACK_SIZE=2048 # MCUBOOT CONFIG_BOOTLOADER_MCUBOOT=y CONFIG_MCUBOOT_IMG_MANAGER=y # Image manager CONFIG_IMG_MANAGER=y CONFIG_FLASH=y CONFIG_IMG_ERASE_PROGRESSIVELY=y # AWS FOTA CONFIG_AWS_FOTA=y CONFIG_FOTA_DOWNLOAD=y CONFIG_DFU_TARGET=y # CJSON CONFIG_CJSON_LIB=y # Download client (needed by AWS FOTA) CONFIG_DOWNLOAD_CLIENT=y CONFIG_DOWNLOAD_CLIENT_STACK_SIZE=4096 ## 2021-09-30 - driver-addition-work-001, git branch name - TMH ## Following Sensors section copied from Kionix out-of-tree driver project: # Sensors CONFIG_I2C=y CONFIG_SENSOR=y ## CONFIG_KX132_1211=y # 2021-10-28 Ted removing Kionix dependencies in branch 'stage1-v1-segger-base'. # STMicro accelerometers iis2dh and lis2dh: CONFIG_IIS2DH=y CONFIG_IIS2DH_RANGE=0 # Select Output Data Rate of 100Hz for demo, values 0..9 defined in ST file iis2dh_reg.h CONFIG_IIS2DH_ODR=5 # Note STMicro HAL/middle-level drivers (pair of files) for iis2dh located in: # [west_workspace]/modules/hal/st/sensor/stmemsc/iis2dh_STdC/driver CONFIG_LIS2DH=y ## 2021-10-08 FRI - implementing timing tests for accelerometer measurements CONFIG_TIMING_FUNCTIONS=y ## 2021-10-30 - enable floating point output from printf() family functions CONFIG_CBPRINTF_FP_SUPPORT=y ## 2021-11-04 - work to enable CMSIS Digital Signal Processing math libraries: ## REF https://devzone.nordicsemi.com/f/nordic-q-a/51656/how-to-include-math-cmsis-dsp-library-in-nrf9160 CONFIG_FPU=y CONFIG_CMSIS_DSP=y ## Search of Kconfig symbols for this project, via `west build -t menuconfig` gives: #CONFIG_CMSIS_DSP_COMPLEXMATH=y # <-- not sufficient for 'arm_rfft_fast_init_f32' and 'arm_rfft_fast_f32' #CONFIG_CMSIS_DSP_FASTMATH=y # <-- not sufficient for 'arm_rfft_fast_init_f32' and 'arm_rfft_fast_f32' #CONFIG_CMSIS_DSP_TABLES_ALL_FAST=y # <-- not sufficient for 'arm_rfft_fast_init_f32' and 'arm_rfft_fast_f32' ## REF https://github.com/zephyrproject-rtos/zephyr/issues/32206 CONFIG_CMSIS_DSP_TRANSFORM=y # 2021-11-11 - Zephyr thread analyzer work: CONFIG_THREAD_ANALYZER=y CONFIG_THREAD_ANALYZER_USE_PRINTK=y CONFIG_THREAD_ANALYZER_AUTO=n CONFIG_THREAD_NAME=y #CONFIG_THREAD_ANALYZER_AUTO_INTERVAL=10 # --- End of project dot conf file ---