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
  • Hi,

     

    In the assert message, you have two addresses that points out:

    And:

     

    What is located at these addresses? You can do a lookup using "arm-none-eabi-addr2line -e build-folder/zephyr/zephyr.elf 0xADDR". If you have re-compiled or done any changes to application, these addresses will move.

    Note that all k_timer instances are running in interrupt context, so you should be very careful of what you're calling in those callbacks. It is recommended to push tasks to a workqueue or similar instead.

     

    Kind regards,

    Håkon

Reply
  • Hi,

     

    In the assert message, you have two addresses that points out:

    And:

     

    What is located at these addresses? You can do a lookup using "arm-none-eabi-addr2line -e build-folder/zephyr/zephyr.elf 0xADDR". If you have re-compiled or done any changes to application, these addresses will move.

    Note that all k_timer instances are running in interrupt context, so you should be very careful of what you're calling in those callbacks. It is recommended to push tasks to a workqueue or similar instead.

     

    Kind regards,

    Håkon

Children
Related