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
Ticker stops working after some time of use #235
Comments
Running a different test (without detach()/attach()), just let the ticker run, gives the same result. After ~4294 seconds the ticker stops working. |
Hi @beegee-tokyo , |
@facchinm |
Thanks for the info! The problem might be indeed in the porting layer since 4294 seconds are almost UINT32_MAX (since the timer ticks at 1MHz) https://github.com/arduino/mbed-os/blob/rp2040_pr/targets/TARGET_RASPBERRYPI/TARGET_RP2040/us_ticker.c . |
@facchinm |
Should be fixed now since we merged a09bee8#diff-eedd8d3e83f8acbff34b5f185f985581038e22debedaceaf1c09139175d3050c (a core release is incoming, but can be already tested using the core from git 😉 ) |
@facchinm |
I have an application where I attach/detach a ticker to control a second thread. Everything works fine for ~1 hour, then suddenly the ticker stops to work and the callback is no longer called. I need to use attach/detach because the tickers are used as watchdog while waiting for an external event. If the event happens, I detach the ticker, otherwise I wait for the callback to be triggered to detach the ticker and react the missing event. I looked as well into the Timeout class, but there is no function to stop the timeout. So if my external event happens, I cannot stop the timeout callback.
Anyone has an idea? I created a small test application to confirm the behavior and it shows the same problem.
Example code:
Log output. The ticker callback is no longer called after
01:11:33.915: T0 triggered at 4294
event:The text was updated successfully, but these errors were encountered: