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.
10 years, 1 month ago.
TICKER handbook example FAILS after approx 30 minutes with NEW mBED Library 91 on Lpc1768
I have found what I believe is a LIBRARY bug which causes the TICKER interrupt to STOP after approx. 35 minutes, or is it 71 minutes. Either way it is WRONG with library 91 and works with older library 76 for example.
Try it, Update the TIcker_HelloWorld example to the latest library and run it on an LPC1768.
I do not know if this impacts on any other platforms.
- include "mbed.h"
Ticker flipper; DigitalOut led1(LED1); DigitalOut led2(LED2);
void flip() { led2 = !led2; }
int main() { led2 = 1; flipper.attach(&flip, 0.5); the address of the function to be attached (flip) and the interval (0.5 seconds - a bit faster )
spin in a main loop. flipper will interrupt it to call flip while(1) { led1 = !led1; wait(0.2); } }
Others are reporting a similar issue here http://developer.mbed.org/questions/5291/Timeouts-stop-working-at-desired-rate-af/. I hope the mbed team are working now to resolve this.
posted by Peter Ampt 17 Nov 2014Hi, have you tested the previous library? (I would suggest the version which doe snot have timestamp_t typedef change).
posted by Martin Kojtal 17 Nov 2014Thanks Martin but could you be a bit more specific about the "previous library" you referred to and where it can be found.
posted by Peter Ampt 17 Nov 2014The "Previous Library" came from one of my other 25 or so mBed projects in my online workspace.
posted by Brian Dockerty 17 Nov 2014Understood thanks Brian. Compiler version control allows you to switch/revert to different mbed libraries so I'll try an earlier version. In the meantime I hope the current version is being fixed.
posted by Peter Ampt 17 Nov 2014Yep, 71 minutes. Same issue I reported. Kind of good to see others are seeing this issue too. Hopefully it leads to a quicker fix! :)
posted by Richard Tucker 18 Nov 2014I was referring to the older mbed revision. I would like to know if this bug was introduced by change timestamp_t typedef there ? I believe that was introduced in lib 89, can you try a version before ?
posted by Martin Kojtal 18 Nov 2014Library build 88 works fine for the LPC1768 ticker
posted by Brian Dockerty 18 Nov 2014The ticker function from the mbed library revision 88 works on the FRDM-KL25Z too.
posted by Peter Ampt 19 Nov 2014