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

How to add timestamp in RTT viewer using NRF log module

Currently developing on NRF52 sdk12 with a terminal

In my source code i have nrf_log_init(null), and this allows me to print stuff to the RTT viewer.

Now I want to be able to show time stamp minutes:seconds:miliseconds on my RTT viewer, when I print my data out from the uC. I'm looking at the on the Nordic infocenter nRF Log Module , and it seems like that I have to initiate the time stamp function by passing a parameter in the init function below:

ret_code_t nrf_log_init	(	nrf_log_timestamp_func_t 	timestamp_func	)	

Currently, in my source code, I have this parameter set be NULL. So, what do I replace the NULL with in order to print out time stamp?

if someone could write out an example on how to use the timestamp function in NRF log module, then it would be great.

Thank you all for your time.

Related