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.
Gustavo,
I apologize that no one has responded to you post until now. I'm asking one of our launchpad experts to get back with you.
Gustavo,
Can you please share your project so I can have a look on what is going on?
Gustavo,
I'm working on your problem and trying to find a way to recover your board.
Can you explain me what are you trying to achieve with the following statement:
systemREG1->CSDIS |= 0xf9u;
in the system.c void setupPLL(void) routine.
Gustavo,
The function setupPLL is used to configure the PLL to the target frequency.
In this example, the CPU is supposed torun at 80Mhz. Internally the PLL is programmed to run at 160Mhz.
To avoid switching from Low to High clock frequency, during PLL lock, the output of the PLL is prescaled (160/32) = 5Mhz
Once the PLL is lock, in the function mapClocks, the prescaler is switched back to /2 making the PLL running at 160/2=80Mhz.
Your following modification in setupPLL are not recommended.
systemREG1->PLLCTL1 = 0x21046300; //80MHz
systemREG1->PLLCTL2 = 0x3FC0723D; //80MHz
Also later on you have:
systemREG1->CSDISCLR = 0x00000002U; // Enable clock source 1
systemREG1->CSDIS |= 0xf9u;
This is a killer. You are switching off the following clock source:
OSCIN: This clock is the source of the PLL.
Low Frequency LPO
High Frequency LPO This clock is by default used by the clock detect module to monitor OSCIN.
When you write F9 to CSDIS, you are killing OSCIN. That will kill the PLL. The clock detect will catch a missing OSCIN and will swith to HLPO. But you also killed HLPO. There is no more clock running in your device.
As result, the CPU is stopped, clockless.
When your reset the device, you re-run this deadly sequence. The debugger needs the CPU to reply to a signal (Debug Request), but the CPU will never reply without clock.
One option to revive your board is to use NowFlash. This utility is used to program/erase the flash.
Configure NowFlash as following:
Then click on Execute. A new window will pop up and at the same time, reset the board multiple time using the nRST button (Not the nPORST)
Eventually NowFLash will be able to take control of the device and will be able to erase the flash.
Please let me know the result.
Thank you. I could solve the problem. The nowFlash is unavailable. His replacement is the CCS UniFlash. It was easy to create a new configuration. One is somewhat confusing conclusion that "Erase Cores ..." is to clear the memory.
This issue has scared me, because it is the first time this happens to me "torturing" a CPU.
This summary of the sequence I made:
The second Launchpad that I repeated the operation is RM42. For the first I used TMS570LS043x
Before I press the OK button on the launchpad RST and not released it to 1 or 2 seconds after you click OK. If it should fail to come back by varying the waiting time.
Again thanks
Gustavo,
I'm glad to see that you were able to recover your board.
Thanks for this work-through using UniFlash. You are correct, NowFlash is no more available for download.
Also your comment on "Erase Cores" should be a little more explicit. I will communicate this comment to our software team.