Other Parts Discussed in Thread: C2000WARE,
Tool/software: Code Composer Studio
Hi all,
I get a problem while operating my app code on flash.
I am using ADC, ePWM1A, eQEP, SCI, I2C right now and an internal oscillator of f28035 to generate CPU clock.
my app code ran very well as I intended when this app code was loaded in SARAM but when loaded into Flash, It malfunctioned.
during debugging, i could figure out there was a loop from InitSysCtrl() function to InitAdc() function.
After the operation of InitSysCtrl(); was finished, Next functions were operated and then InitAdc(); was operated.
however, after the operation of InitADC(); function was completed, InitSysCtrl();function operated again and did the above sequence infinetely. - it looped!
And "SysCtrlRegs.PLLSTS.bit.DIVSEL" kept changing from 0 to 2 or from 2 to 0 and the array I had declared for storing the ADC values were not stable. these changed to unpredictive values. (when this app code was loaded into SARAM and then executed, it achieved stable values.)
and here is the what I noticed one more.
In InitAdc() function, there was (*Device_cal)(); function. after finishing this function, it didn't go next instruction line. instead, the InitSysCtrl() function was operated again.
to sum up what I have said so far,
when my app is loaded into Flash then executed, an overall system including PLL setting gets seriously unstable. but when loaded into SARAM, it operates very well as I intend.
but the above issue was just the part of the whole issues I underwent.
sometimes it didn't resume or I got the message "No source available for "0x3ff8a1"
so, I guess these issues are relevant two things.
first one is because the speed of oscillator is quite slow to operate my app code or the operation speed of flash is too slow.
second is because Linker cmd file isn't configured well.
English is not my mother language so I know it would be hard for you to get my point. if there is something that makes you confused, it would be glad for me to answer you.
It would be appreciated so much for me if I could get your help and support.