-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
STM32F103 freezing after a short while - worked fine before. #23
Comments
May marking the variable used inside interrupt as "volatile" solve the issue? If you share a failing code would be useful; still I'll try to recreate. |
I also tried replacing the variable with just delayMicroseconds(1) The program is big with some custom libraries and dependencies, but the gist is: All I needed/used was: TimerLib.setInterval_us(timer20hzEvent, 50000); void timer20hzEvent() { This had worked for years. The main loop checked variable timer20hz. It is years since I changed the essential parts of this code. This could very well be some super-odd case of some incompatibility between updated libraries/compiler... |
If you check the code, it has been 3 years since last change: https://github.com/Naguissa/uTimerLib/tree/master/src/hardware Using delay inside interrupts is a no-go. timer20hz variable should be declared as volatile. As stmt2_core I understand official ST core, right? It's not Roger Clark one. As implementation has not changed I suspect something changed on ST core; I'll try to recreate when I have some spare time. |
Yes, official ST core I also tried older Arduino IDE 2.3.2, and older ST-code, and failed to make it work. |
I set a timer for 50ms
The failed function does not need to do anything - it usually just set a variable.
After a short while, the uC will freeze.
This worked fine half a year ago, when I last compiled this program.
now it fails after a while.
(I omitted the use of this library to solve it.)
The text was updated successfully, but these errors were encountered: