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

Log on interrupt while another log is being processed causes hang

See the below stack trace using nRF5 SDK 17.0.2, where execution had stopped while entering a critical region during an interrupt event when another log was being processed in the main run loop. Is there any way to prevent this?

Parents
  • Haven't really since this before, are you logging to UART or RTT? I notice it also says flash there, are you logging/writing to flash? Is there any difference if you use NRF_LOG_DEFERRED 0? Are you doing any NRF_LOG_FLUSH() that affect this?

    Kenneth

  • RTT. No, it just happens to be doing a log when performing a flash operation in my code, but the flash write is not in progress at that point, and I am not logging to flash. It is logging a hex dump of 1kb data, so it takes a bit longer and increases the probability that an interrupt will occur while the log data is transferred over RTT. NRF_LOG_DEFERRED is 0. I am not manually calling NRF_LOG_FLUSH(). RTT is blocking, so main loop is waiting for RTT send when the interrupt occurs.

Reply
  • RTT. No, it just happens to be doing a log when performing a flash operation in my code, but the flash write is not in progress at that point, and I am not logging to flash. It is logging a hex dump of 1kb data, so it takes a bit longer and increases the probability that an interrupt will occur while the log data is transferred over RTT. NRF_LOG_DEFERRED is 0. I am not manually calling NRF_LOG_FLUSH(). RTT is blocking, so main loop is waiting for RTT send when the interrupt occurs.

Children
Related