|
PSoC3 just like other 8051 CPU, use the intenal RAM for stack which is a total of 256 bytes. Some of those are working registers and some are specially used for bit variables.
I am not sure if Keil uses a software stack or not, but software stack slows down ISR.
For PSoC3 the stack is limited by what the compiler allocated for during compilation. Don't think we should touch/change it.
You can allocated the stack size for PSoC5 via creator
Recusive interupt should be avoid as you may overun your stack if the interrupt triggred quicker than your response time. then your system would failed and the outcome is unpredicable.
Provide that you need to handle interrupts that are comes in a short burst, and as you stated that the interrupt would comes faster than your ISR and is acceptable to you.
You can
1. As suggesteg byt others members, to use a counter in the interrupt routine, and perform the required operation in your main loop by checking the counter (needs to have some mechanism to control accessing of the counter during interrupt and the main loop).
Or.
2. Proveded you ONLY need to handle 2 succesive interrupts.
use 2 ISR souce to 2 ISR routines say ISR1routine and ISR2routine
in ISR1, clear pending of ISR2 and enable ISR2. Rememeger the prority of the two ISRs, you have to set ISR2 higher IF you wants to handle ISR2 first. otherwise, ISR2 would be handled after ISR1.
|