I'm just starting to learn the ins and outs of the Infineon C167CS-40M and have come across a roadblock in my programming. Any time I try to use global or static variables in my ISR, the data in the variables gets cleared out or corrupted somehow.
Am I not allowed to use static and global variables for ISRs? Is there some initialization code for it I'm missing? Or is there some other way to pass variables to the ISR from the main program and vice versa?
Any help is greatly appreciated.