FP kernel crash stm32F4 discovery
Posted: Mon Sep 22, 2014 1:27 pm
Hi All,
I have a question about using Erika on the STM32F4 discovery board.
background info:
I have 5 task defined within the oil file, all of them have different priorities and a shared stack other then that, the "schedule" property is "FULL".
In my application (media streaming application) I send data from my laptop to the board over UART. Also, I'm using Fixed Priority scheduling
The problem:
when I fire up the board everything runs fine, and
I can see (using UART/leds) that all the 5 tasks are executed on time regarding the period (or cycle).
Now what happens, is that after a short period of time (few seconds) the board stops responding and hangs completly. When I debug the application this is my result:
#1 <signal handler called>
#2 0x0800028e in MyFunction (
imageBuffer=0x2000000c <MyBuffer> "\003", new_block=0x54532030)
at ../application_func.c:9
#3 0x08000dd2 in FuncTask_node_rp () at ../code.c:277
#4 0x08001ce4 in EE_std_run_task_code (tid=1)
at some_path/ee_files/pkg/cpu/common/src/ee_context.c:55
#5 0x08001c92 in EE_cortex_mx_change_context (tid=1)
at some_path/ee_files/pkg/cpu/cortex_mx/src/ee_context.c:54
#6 0x080016c6 in EE_cortex_mx_pendsv_ISR ()
at some_path/ee_files/pkg/cpu/cortex_mx/src/ee_gnu_change_context_isr.S:229
#7 0x080016c6 in EE_cortex_mx_pendsv_ISR ()
at path_to_erika/plugins/---Type <return> to continue, or q <return> to quit---
some_path/ee_files/pkg/cpu/cortex_mx/src/ee_gnu_change_context_isr.S:229
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
where MyFunction is a function from my application and MyBuffer is a globally defined buffer.
Worth telling is the fact that when I change the priority of the 5 tasks in such a way that they are all the same (for example all priorities are "5") then the application does not hang.
As far as I can make up from the stack-trace I think that the board crashes on the moment of a context-switch, My guess so far is that, because the task hasn't finished execution yet, it gets preempted.
But the stack size is not sufficient enough and then the board crashes, could this be the case? and if so, how to solve this?
If you need some other information let me know.
Best regards,
Frank
I have a question about using Erika on the STM32F4 discovery board.
background info:
I have 5 task defined within the oil file, all of them have different priorities and a shared stack other then that, the "schedule" property is "FULL".
In my application (media streaming application) I send data from my laptop to the board over UART. Also, I'm using Fixed Priority scheduling
The problem:
when I fire up the board everything runs fine, and
I can see (using UART/leds) that all the 5 tasks are executed on time regarding the period (or cycle).
Now what happens, is that after a short period of time (few seconds) the board stops responding and hangs completly. When I debug the application this is my result:
#1 <signal handler called>
#2 0x0800028e in MyFunction (
imageBuffer=0x2000000c <MyBuffer> "\003", new_block=0x54532030)
at ../application_func.c:9
#3 0x08000dd2 in FuncTask_node_rp () at ../code.c:277
#4 0x08001ce4 in EE_std_run_task_code (tid=1)
at some_path/ee_files/pkg/cpu/common/src/ee_context.c:55
#5 0x08001c92 in EE_cortex_mx_change_context (tid=1)
at some_path/ee_files/pkg/cpu/cortex_mx/src/ee_context.c:54
#6 0x080016c6 in EE_cortex_mx_pendsv_ISR ()
at some_path/ee_files/pkg/cpu/cortex_mx/src/ee_gnu_change_context_isr.S:229
#7 0x080016c6 in EE_cortex_mx_pendsv_ISR ()
at path_to_erika/plugins/---Type <return> to continue, or q <return> to quit---
some_path/ee_files/pkg/cpu/cortex_mx/src/ee_gnu_change_context_isr.S:229
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
where MyFunction is a function from my application and MyBuffer is a globally defined buffer.
Worth telling is the fact that when I change the priority of the 5 tasks in such a way that they are all the same (for example all priorities are "5") then the application does not hang.
As far as I can make up from the stack-trace I think that the board crashes on the moment of a context-switch, My guess so far is that, because the task hasn't finished execution yet, it gets preempted.
But the stack size is not sufficient enough and then the board crashes, could this be the case? and if so, how to solve this?
If you need some other information let me know.
Best regards,
Frank