Not applicable
Mar 01, 2017
02:31 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 01, 2017
02:31 AM
The question is actually in the title.
I'm using a Timer app to send Values to a shift register per SPI.
I would like to receive commands through serial to control the process.
Starting the timer is not the problem. Stopping it is. I guess I have to enable interrupts inside the timer interrupt callback function. But how do I do it in dave 4.3.2?
Thank you!
I'm using a Timer app to send Values to a shift register per SPI.
I would like to receive commands through serial to control the process.
Starting the timer is not the problem. Stopping it is. I guess I have to enable interrupts inside the timer interrupt callback function. But how do I do it in dave 4.3.2?
Thank you!
2 Replies
Mar 01, 2017
03:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 01, 2017
03:40 AM
Is this possible?
Set a global flag in the ISR.
Then stop the timer in the main loop.
Set a global flag in the ISR.
Then stop the timer in the main loop.
Not applicable
Mar 01, 2017
04:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 01, 2017
04:50 AM
That's what I'm wondering.
I'm stoppinng the timer in the main loop and not in the interrupt. When I receive the corresponding command I stop the timer in the main loop. But every time I get a status failure for the stop command. The timer keeps going through the value pattern I set to send till it is finished. I can only stop it inside the interrupt
when it gets a certain conditioon
You mean I could create a global variable and when I receive the stop command I change the flag and every time the interrupt is triggered I check the flag status and stop if the flag is active?
thanks
I'm stoppinng the timer in the main loop and not in the interrupt. When I receive the corresponding command I stop the timer in the main loop. But every time I get a status failure for the stop command. The timer keeps going through the value pattern I set to send till it is finished. I can only stop it inside the interrupt
when it gets a certain conditioon
You mean I could create a global variable and when I receive the stop command I change the flag and every time the interrupt is triggered I check the flag status and stop if the flag is active?
thanks