Part Number: TMS320F28377D
Tool/software: Code Composer Studio
Hello community
I want to know if it is necessary to declare my variables as "voltatile " in my code.
I have some variables which are calculated inside the ISR (their value is changed there) and I want them to keep these values until next time that this ISR happens.
I have declared them as float (e.g. float x=0;) in the top of my code (outside the ISR and main function)
Q1-- Is this way correct? or I should declare them as voltatile or other declaration?
If I have some loops (for loops) or switch case inside the ISR, where should I declare their variable, i.e., for( n = 0; n<7; n++ ) where should I declare "n". I have decleard it as Uint16 n; roght at the top of "for loop" inside the ISR.
Q2--Is it correct too?
Regards