I have an Arduino project where I run a timer-based interrupt which calls an Interrupt Service Routine (ISR) at at 5 kHz, and I am trying to use the Preferences library to store data from the loop() routine, but I get what looks like a watchdog crash/reboot related to the timer interrupt.
In the Setup() routine, if I start the timer interrupt before trying to use Preferences, I get the same error, but if I start it after, I can Clear, Write and Read data using Preferences calls with no problem, so I am fairly certain the issue if with the timer-based ISR and some associated watchdog.
I tried various examples I saw to disable the timer/ISR functions in the loop() routine, to allow the Preferences calls to work, but I always get the same crash/reboot.
I was wondering if someone could offer guidance as to how to properly pause or stop or even terminate the timer-based ISR, or it’s watchdog, to allow storing data using Preferences in the loop() routine.
Storing Preferences and suspending Timer Interrupts
Who is online
Users browsing this forum: No registered users and 69 guests