SAM70 call HardFault_Handler() after xSemaphoreGive()

keflex87 wrote on Thursday, February 09, 2017:

Hallo i use the ATSAME70Q21 and want to use FREERTOS (8.2.3). In my example projekt i have 2 Tasks with a binary semaphore. The first task “task monitor” should notify the second task “task_led”. I have bebugged my code:

Program sequence while debugging:

  1. xSemaphoreGive() was called in task monitor() and went over.
  2. xSemaphoreTake() was called in task_led() and went over.
  3. xSemaphoreTake() was called in task_led() and stoped there.
  4. xSemaphoreGive() was called in task monitor() went over and called after that the HardFault_Handler().

Can you help me? Tank you for your support. Why was the HardFault_Handler() called? Where ist the problem?

Best regards
Andre

Code:

keflex87 wrote on Thursday, February 09, 2017:

keflex87 wrote on Thursday, February 09, 2017:

Progamm see Appendix

rtel wrote on Thursday, February 09, 2017:

What does delay_ms() do? What happens if you replace delay_ms() with
vTaskDelay()?