Other Parts Discussed in Thread: HALCOGEN
Hi,
I am using a TMS570LC4357 and I am experiencing some issues while trying to deactivate the Power domain 4 (Flexray and FTU).
I want to disable power domain 3, 4 and 6. Then in my code I repeat 3 times the logic described in chapter 5.3.4.1 of TMS570LC4357 TRM, that is:
1. Write to the PDCLK_DISx register to disable all clocks to the power domain.
2. Write 0xA to the LOGICPDPWRCTRL0 register to power down the domain.
(I didn't code the third step, as it is optional, as indicated in spna173).
My code is as follow:
// Disable power domain #3 (PCR3 peripherals)
PDCLKDISSET->S_FIELDS.PDCLKDISSET1 = 1;
LOGICPDPWRCTRL0->S_FIELDS.LOGICPDON1 = 0xA;
// Disable power domain #4 (Flexray and Flexray Transfer Unit)
PDCLKDISSET->S_FIELDS.PDCLKDISSET2 = 1;
// PATCH: The line below leads to a CPU halted in WinIdea (at the bottom right of the IDE, "RESET" state appears).
// LOGICPDPWRCTRL0->S_FIELDS.LOGICPDON2 = 0xA;
// Disable power domain #6 (ePWM, eCAP, eQEP)
PDCLKDISSET->S_FIELDS.PDCLKDISSET4 = 1;
LOGICPDPWRCTRL1->S_FIELDS.LOGICPDON4 = 0xA;
With the code executed as presented above (PD4 power down command is commented), the code executes correctly and the software continues its execution. When stopping the execution (in the debugger), I can see that the status registers indicate that power domains PD3 and PD6 are in OFF state. I can also see that PD4 is in IDEL state (as the clocks have been disabled.
If I un-comment the PD4 power down command, when this line of code is executed the CPU is indicated as in RESET in the debugger, and I am forced to perform a "reset CPU" operation to be able to control the CPU again.
I checked the TRM, datasheet and errata (silicon B) documents but nothing is listed about this problem, neither in the Hercules safety microcontrollers forum.
Do you have any clue what the problem could be?
For info, I am using iSystem WinIdea debugger (IC5000 probe). I am also forwarding this post to their support but I think this is more a TMS-related issue than a debugger-related issue.
Thanks,
Best regards,
Gael