Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
2 years, 10 months ago.
Timeout stops working
Hello, I have created a board for my project where an LPC11U24 (64pin) is the MCU. I can program it through the USB. It looks like I cannot resolve an issue. There are several objects created in the program: - Andy Kirkham's MODSERIAL - Few objects with TimeOut - Few pins with InterruptIn - And a main loop with LED flasher. Upon powering on, everything looks like fine, the boards does what it should. After a while (very rarely after several ten seconds, more often after several hours (>12 hours) TimeOut objects stop working, the repeated attach() functions never do the job again. However the main loop with the LED flasher and the MODSERIAL keep running fine. Details: - The MODSERIAL object is almost continuously receiving and transmitting data. (About 25 msec break is allowed). This works fine always. - The main loop which handles all the events coming from all the objects is also fine, a LED flasher (let's call a heartbeat signal) keeps running always. - The TimeOut objects that would send pulses out by calling the attach function according to a pulse pattern stop working after a while, usually after several hours of operation. Sometimes it happens after days of operation. - The InterruptIn objects are also affected, after the TimeOut objects stopped the InterruptIn doesn't occur (ie. no interrupt on an input signal) also. - The TimeOut's time out is set to the range of microseconds (typically 40 us and 1000us, yep a Wiegand output) but if it's increased to the range of milliseconds - even to hundreds of milliseconds just for testing - that doesn't help. Could you help me please by pointing out where to begin the debugging ? It doesn't seem a hardware issue, there's no freezing. Can that happen that the serial interrupt (MODSERIAL is based on interrupt) keeps working whilst the TimeOut and InterrupIn associated interrupts stop working because of a race condition ? Any help would be highly appreciated, Thanks in advance Csabi