We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi, I've timer T6 set to send interrupt (level 11, group 1) each 500 microseconds. This interrupt is managed by a routine. I need to know how many time remains after this routine before the next T6 Interrupt, because I need to insert some other code in the same routine if it's possible.
I suppose I need another timer, but I don't know how to use it.
Another question: what happens if the routine requires more than 500 microseconds.
Many Thanks, Marco
Thank you very much. Now I try the way you suggest.
Then I will need to find a way to calculate this execution time in run time mode because my board is in a net of 50 boards working together and it's not easy to simulate what my board has to do because it depends on the other boards requests.
If you have a spare pin - toggle it when you enter and leave the ISR. That gives an indication how many % of the total CPU capacity the ISR takes. Note that you have to manually add a bit of time for the prologe/epiloge.
The advantage with this approach is that you can see how much the pulses jitter, i.e. variance in ISR execution times (if there are conditionals in the code) and how the start of the ISR jitters because of other ISR, disabled interrupts etc.
Sorry, but I must re-post this message. ---- Now I check if I've a spare pin, my fw runs on 4 kinds of boards. Then how I can see the execution time in run time mode? Many Thanks
I would recommend an oscilloscope.
Ok, it's a way to lab test and not for the run time behaviour on the plant. Thanks, Marco