XMC4700: How to achieve a nested interrupt with Dave Apps?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
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!
0 Likes
2 Replies
User12775
Level 5
Level 5
First solution authored First like received
Is this possible?
Set a global flag in the ISR.
Then stop the timer in the main loop.
0 Likes
Not applicable
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
0 Likes