Hello!
Recently I was asked to find a way to enable timestamps in our debug logs to make it easier to track performance during various stages of the operation of our device.
I found a few blog posts detailing the process and saw that you have to enable NRF_LOG_USES_TIMESTAMP in the sdk_config.h file. I enabled that, expecting that to be the end and now when I start up my debug session the device hardfaults and doesn't run the program.
Doing a little more digging I found the following blog post https://devzone.nordicsemi.com/f/nordic-q-a/43701/logging-with-timestamp-on-sdk-15-2. It instructs the questioner to enable NRF_LOG_USES_TIMESTAMP, as I did, and then NRF_LOG_INIT(app_timer_cnt_get), which I changed my code to run. Unfortunately this didn't fix the hardfaulting issue.
As soon as I set NRF_LOG_USES_TIMESTAMP to 0 as it was before my program runs as expected. What step am I missing to enable the timestamp?
For reference
I am on SDK version 17.0.2
my chip is an nrf52832
I am developing using Segger Embedded studio and hope to be seeing the timestamps in it's built in terminal.
Thanks in advance, please let me know if you need any additional information.