This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software: Code Composer Studio
I am having problems with running my code on flash. I am running adc isr which seems to run okay when I run my converter on RAM. However, when I move my code to flash, the controller PWM signals are spurious during the startup. The spurious signals appear as soon as the code goes into the adc isr. I am not sure if the controller is properly copying the code into the isr. Any leads on that?
Hi Maida,
Please take a look at this FAQ to make sure the project is built for flash execution correctly: https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/758797?-FAQ-F05-Flash-How-do-I-convert-a-RAM-based-project-to-a-flash-based-project-
Once you load the code in to flash and execute the memcopy(), you can check the corresponding RAM address to see whether the ISR is copied correctly from flash or not. Also, make sure that the wait-states are configured for the flash correctly.
Note: I will not be available next week. I will ask my colleague to help you in case if you still need help on this..
Thanks and regards,
Vamsi
How do I check if waitstates are configured correctly? I thought the InitFlash() does this.
Maida,
Yes, InitFlash() will take care of it - if you are using it, then good. Make sure you execute it from RAM.
And check all other things mentioned in the FAQ.
I assigned this to my colleague for further support in my absence.
Thanks and regards,
Vamsi
I have checked most of the settings. Actually when I run the program from flash, it behaves differently if the controller is connected to the computer vs when the controller is disconnected from computer. Could you guide me as to what could be happening? For instance in my case I am trying to run a digital control loop and its behavior is changed in the aforementioned cases even though the parameters are same.
Maida,
Is this your custom project, or are you running any C2000ware DriverLib example? Can you try one of the simple example and build flash configuration and check if it works ok from Flash?
Hi Santosh,
Yes that issue is resolved now. Turns out there was one control variable in code which was not initialized to zero. It worked fine in RAM but when run from flash, the controller was assigning garbage values to that variable which made everything unstable.
Thanks for the followup!