Hi
It appears that a weakness with the mikroC PRO for ARM, is a limitation on what you can do and call from within an interrupt.
My code is often very interrupt driven because I need realtime control and processing. Setting flags for routines to run outside of an interrupt leads to significant timing problems.
Is it possible to increase the Stack allocation to allow more stack intensive code on existing compilers?
Is this to be addressed in upcomming compilers?
Interrupt routines
Re: Interrupt routines
Hello marke
could you be more specific about problem you are having with using function from interrupt and stack allocation.
Are you receiving warning from compiler about possible stack problems with recursion and crosscalling
or you have real-run-time problem that app crashes.
could you be more specific about problem you are having with using function from interrupt and stack allocation.
Are you receiving warning from compiler about possible stack problems with recursion and crosscalling
or you have real-run-time problem that app crashes.
Re: Interrupt routines
Hello rajkovic
Yes, I have had problems where the code has not run, and got lost.
If I set up a system tick interrupt and use this to call other routines based on time slots, I have found that the code gets lost.
If I use the same routines and get the system tick interrupt to set flags based on time slots, then use are flag detection loop in the main loop and branch to these routines based on the flags set, everything works fine but I can not afford to have any "slow" code running either in, or branched from the main loop.
For real time operation, I need to run the routines under interrupt rather than the flag redirection.
The individual routines are quite short, but if I want to work with say an LCD output in the main loop, this will interfere with the real time operation due to the "waits" in the LCD code.
Yes, I have had problems where the code has not run, and got lost.
If I set up a system tick interrupt and use this to call other routines based on time slots, I have found that the code gets lost.
If I use the same routines and get the system tick interrupt to set flags based on time slots, then use are flag detection loop in the main loop and branch to these routines based on the flags set, everything works fine but I can not afford to have any "slow" code running either in, or branched from the main loop.
For real time operation, I need to run the routines under interrupt rather than the flag redirection.
The individual routines are quite short, but if I want to work with say an LCD output in the main loop, this will interfere with the real time operation due to the "waits" in the LCD code.
- filip.grujcic
- Posts: 822
- Joined: 14 May 2018 08:34
Re: Interrupt routines
Hi Marke,
Would it be possible for you to zip and attach the project you've had issues with when calling functions straight from the interrupt itself?
Kind regards,
Would it be possible for you to zip and attach the project you've had issues with when calling functions straight from the interrupt itself?
Kind regards,
Filip Grujcic