Hi Guys
Can you please explain to me why am I getting these serious warnings?
Serious Warning: Possible sw stack corruption, function 'Wdt_Delay_Ms' called by more than one asynchronous thread (main/Task, interrupt, interrupt low)
Serious Warning: Possible sw stack corruption, function 'FCD_LCDDisplay0_RawSend' called by more than one asynchronous thread (main/Task, interrupt, interrupt low)
Serious Warning: Possible sw stack corruption, function 'delay_ms' called by more than one asynchronous thread (main/Task, interrupt, interrupt low)
I even removed delays and replaced them with count until to try and get rid of this error but to no avail.
Regards
Xavier
Serious Warnings
Moderator: Benj
-
medelec35
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: Serious Warnings
Hi Xavier,
one cause is having a call macro within an interrupt macro.
Interrupt macros should be as short as possible, and be allowed to exit at the end.
Another cause is having a the same delay within a interrupt that is within a component that's not in the interrupt.
For example an LCD component(contains ms delays) within an interrupt (Not recommended)
and ms delays within a different call macro.
I would recommend ADC and LCD components being placed within a non interrupt macro.
Hope this helps.
Martin
one cause is having a call macro within an interrupt macro.
Interrupt macros should be as short as possible, and be allowed to exit at the end.
Another cause is having a the same delay within a interrupt that is within a component that's not in the interrupt.
For example an LCD component(contains ms delays) within an interrupt (Not recommended)
and ms delays within a different call macro.
I would recommend ADC and LCD components being placed within a non interrupt macro.
Hope this helps.
Martin
Martin
- Jan Lichtenbelt
- Posts: 797
- Joined: Tue Feb 17, 2009 8:35 pm
- Location: Haren GN, the Netherlands
- Has thanked: 128 times
- Been thanked: 264 times
- Contact:
Re: Serious Warnings
Hi Martin
I have the same problem for one own macro (FCM_RC5_Tx), a PWM function (FCD_0df41_PWM1__Enable) and also the delay (delay_us).
I have 2 interrupt macros (IOC and Timer1) but in both only a counter is increased with 1.
Can there be other reasons for the stack corruption warning?
Kind regards
Jan Lichtenbelt
I have the same problem for one own macro (FCM_RC5_Tx), a PWM function (FCD_0df41_PWM1__Enable) and also the delay (delay_us).
I have 2 interrupt macros (IOC and Timer1) but in both only a counter is increased with 1.
Can there be other reasons for the stack corruption warning?
Kind regards
Jan Lichtenbelt
-
Spanish_dude
- Posts: 594
- Joined: Thu Sep 17, 2009 7:52 am
- Location: Belgium
- Has thanked: 63 times
- Been thanked: 102 times
- Jan Lichtenbelt
- Posts: 797
- Joined: Tue Feb 17, 2009 8:35 pm
- Location: Haren GN, the Netherlands
- Has thanked: 128 times
- Been thanked: 264 times
- Contact:
Re: Serious Warnings
Hi Nicolas,
The flowcode is rather complex.
Can you help me with general advices?
Kind regrads
Jan Lichtenbelt
PS. In the meanwhile I found the source of the warning. I had an additional ASD (auto shut down) interrupt. After removing this last one, the warnings disappeared
The flowcode is rather complex.
Can you help me with general advices?
Kind regrads
Jan Lichtenbelt
PS. In the meanwhile I found the source of the warning. I had an additional ASD (auto shut down) interrupt. After removing this last one, the warnings disappeared
-
Spanish_dude
- Posts: 594
- Joined: Thu Sep 17, 2009 7:52 am
- Location: Belgium
- Has thanked: 63 times
- Been thanked: 102 times
Re: Serious Warnings
Glad you found the error.Jan Lichtenbelt wrote:PS. In the meanwhile I found the source of the warning. I had an additional ASD (auto shut down) interrupt. After removing this last one, the warnings disappeared