Part Number: TMS320F28027
Hej allesammen,
I have a very interesting problem that I don't really quite grasp:
Observation:
I have a timer-interrupt routine that runs every 500us. Due to the frequency and the number of calculations, I put the interrupt routine into ramfuncs section:
#pragma CODE_SECTION(myVerySpecial_Timer2_Isr, "ramfuncs");
Now inside that routine I sample a GPIO using
GPIO_getData(myGpioHandle, GPIO_Number_3)
Since this GPIO_getData function is located in flash and the compiler has probably no reason to inline it,
the CPU switches the context from RAM to FLASH.
Now, I have some ADC conversion routines going on during the meantime.
The ADC conversions jitter around a few millivolts with GPIO_getData !!!
Solution:
I replaced the GPIO_getData functions with direct register reading.
Same functionality, but now I have no Jitter anymore!
How can it be that replacing GPIO_getData solves my issue??
Does anyone have had similar observations?
Thank you for reading, looking forward to hear about your insights.