c - FreeRTOS - Stack corruption on STM32F4 -


i having problems think stack corruption of error of configuration while running freertos on stm32f407 target.

i have looked @ freertos stack corruption on stm32f4 gcc got no there.

the application runs 2 tasks , relies on 1 can interrupt. workflow follows:

  1. the 2 tasks, network_task , app_task created along 2 queues, raw_msg_queue , app_msg_queue. can interrupt set up.
  2. the network_task has highest priority , starts waiting on raw_msg_queue, indefinitely.
  3. the app_task next , starts waiting on app_msg_queue.
  4. the can interrupt triggers because of external event, adding can message raw_msg_queue.
  5. the network_task wakes up, process message, adds processed message app_msg_queue , continues wait on raw_msg_queue.
  6. the app_task wakes , hard fault.

the thing have wrapped calls app_task makes xqueuereceive in 2 steps because of end-user convenience , portability. app_task total function chain calls network_receive(..) -> os_queue_receive(..) -> xqueuereceive(..). works well, when returns xqueuereceive(..) manages return os_queue_receive(..) before returns seemingly random memory location , hard-fault.

the stack sizes should adequate , set 2048 both, large data structures passed around pointers.

i running code on 2 stm32f407. freertos @ version 7.4.2, latest @ time of writing.

i hoping can me out here!

first, can take here , try more info hard fault. may want check interrupt priority setting, tricky arm cortex-m interrupt priority mechanism causes trouble in freertos. refer here.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -