Page 1 of 1

Problems with sw stack corruption

Posted: Tue Nov 27, 2007 9:14 pm
by Jan Middel
Hello,

I have made a digital clock and i works good.
But when a send it tho de pic controller i get a warning.

Call Stack Usage Report
=======================
main and Task(s): hw used:5, exceeded by:0
interrupt: hw used:6, exceeded by:0
Serious Warning: Possible sw stack corruption, function 'FCD_LCDDisplay0_Clear' called by more than one asynchronous thread (main/Task, interrupt, interrupt low)


Can anybady tell my what is the problem?

Groeten Jan Middel

Posted: Wed Nov 28, 2007 9:05 am
by Steve
This is because you are accessing an LCD macro from within an interrupt as well as the main program. Ideally, you should keep interrupt routines as simple as possible and not access any other macros (or delays) from an interrupt.