Serious Warnings

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Post Reply
Xavier
Posts: 99
Joined: Sat Mar 17, 2012 11:26 pm
Location: South Africa
Has thanked: 5 times
Been thanked: 3 times

Serious Warnings

Post by Xavier »

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
Attachments
PI_Detector_New.fcf
(36.39 KiB) Downloaded 327 times

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

Post by medelec35 »

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
Martin

Xavier
Posts: 99
Joined: Sat Mar 17, 2012 11:26 pm
Location: South Africa
Has thanked: 5 times
Been thanked: 3 times

Re: Serious Warnings

Post by Xavier »

Thanks Martin I will try doing it your way.

All the best
Xavier

User avatar
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

Post by Jan Lichtenbelt »

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

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

Post by Spanish_dude »

Hey Jan, can you post your flowcode file ?

- Nicolas

User avatar
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

Post by Jan Lichtenbelt »

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

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

Post by Spanish_dude »

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
Glad you found the error.

Post Reply