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

NRF_LOG_INFO is printed after a delay

Hello,

I am using the NRF_LOG_INFO macro to print certain event results. I am writing a large chunk of memory over I2C. The operation succeeds but the log print is only seen after the entire write operation has completed. For example

NRF_LOG_INFO("Starting write op");
init_sensor(); // where write happens
NRF_LOG_INFO("Done");

In this pseudocode, I should see "starting write op" first when the board boots, but the write takes a while, and I see both the prints together after the init_sensor function has completed it's job. 

I am trying to understand why this may be happening. Can you give me some inputs?

Related