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

K_TIMER() - HARD_FAULT - Data Access Violation - nrf9160

Hi,

Currently we working on a project that uses:

  • nRF9160
  •  Zyphre OS
  •  Segger Embedded Studio for  Arm (Nordic Edition) V5.10d
  •  SDK v1.4

We need to handle multiple timeouts, to handle our processes, but we have a problem that we think occurs when our K_TIMERS expire. We are looking for restrictions on using multiple timers but we do not find any, the functions we are using are the following:

  1. k_timer_init(timer, NULL, NULL);
  2. k_timer_start(timer, K_MSEC(timeout), K_NO_WAIT);

And this is the error:

  • Is this a known bug?
  • Does anyone know of any restrictions that can cause this?
  • What could we be doing wrong?

Thanks a lot.

Parents Reply
  • Hi René

     

     

    ReneDelgado said:
    Sorry for the delay, I have the most popular virus from this year.

     I'm sorry to hear. I hope you and your closest are OK.

     

    ReneDelgado said:

    Yes regarding to our sequence is like you mentioned, but regarding to spinlock.h#L92 we do not calling this function explicit neither we are using recursive functions. As note, we are using mutex as the documentation suggest.

    Also note that if I enable the segger system view this cracks earlier.

    Aha. this is an issue I've also spent some time digging into.

    When you're using RTT and no logger thread (ie. no context switch for logging), you can run into this scenario when printing in interrupts:

    https://github.com/zephyrproject-rtos/zephyr/issues/11393

     

    Are you printing from the k_timer callback? if yes, can you check if the issue still occurs if you use LOG=y and LOG_IMMEDIATE=n?

     

    Kind regards,

    Håkon

Children
Related