Page 1 of 1

warning at compile

Posted: Mon Jan 11, 2016 3:56 pm
by siwo278
Hello

Dear Colleagues have a problem with compiling the program. There is a mistake but rather a warning of the possibility of error " Building CASM file
Serious Warning : Possible s stack corruption , function ' __mul_16u_16u__16 ' called by more than one asynchronous thread ( main / Task , interrupt , interrupt Low )
"
Which results in a warning . The program in emulation mode works correctly , as expected. This program is a simple timer , long time intervals up to 4 hours . It also has the ability to control via RS232 .


ostrzeżenie w trybie kompilacji
Witam

Szanowni koledzy mam problem z kompilacją programu. Występuje bład, a raczej ostrzeżenie o możliwości wystąpienia błedu: " Building CASM file
Serious Warning: Possible sw stack corruption, function '__mul_16u_16u__16' called by more than one asynchronous thread (main/Task, interrupt, interrupt low)
"
Czego wynikiem jest to ostrzeżenie. Program w trybie emulacji działa poprawnie, zgodnie z oczekiwaniem. Program ten jest bardzo prostym przekaźnikiem czasowym, z długimi interwałami czasowymi do 4h. Posiada też możliwość sterowania przez RS232.

Re: warning at compile

Posted: Tue Jan 12, 2016 4:14 pm
by Benj
Hello,

The warning is stating that a function (16-bit multiply) is used in both the main code and the interrupt routine. If your inside the function in the main when the interrupt fires then you will likely get some stack and RAM corruption.

If you can try and simplify your interrupt routine and this should fix the issue.

Re: warning at compile

Posted: Tue Jan 12, 2016 7:16 pm
by siwo278
Hello!

Thank you for the quick reply. That's what I thought , with the result of the use of variable Uint the interruption . But I was not sure .

Natalia