Part Number: TMS570LC4357
Other Parts Discussed in Thread: TMS570LS3137, HALCOGEN
Hi,
I am trying to get a TMS570LC4357 to enter low power mode, with all clocks being disabled, then wake up through GIO, CAN, or SCI (although I have not tried the latter yet).
The documentation for this process feels oblique to the extreme, and unfortunately the dozen or so topics asking for help about low power mode seem to have ended on non-answers, with the general idea being: this chip theoretically does support it, but there are issues with leakage. An example for a different chip is available (a chip which has an official document about it, Reduction of Power Consumption for TMS570LS3137, unlike the TMS570LC4357). Unfortunately even after some messages show attempts at making it compatible with the TMS570LC4357 there's no decisive "I got it to work" answer.
I am trying to keep this part of the code to a minimum before adding more and more features. As a result, I don't currently care about turning off the FLASH modules, just the clocks. I don't know if there is an impact or not. The function I use to turn off the system (code shown below) is in RAM.
My code is effectively:
- *(SYS_BASE_ADDR + SYS_CLKTEST_OFFSET) = 0x30A0000;
- Turn on LED0.
- *(SYS_BASE_ADDR + SYS_CSDISSET_OFFSET) = 0x000000FF;
- Turn on LED1.
- asm volatile (" WFI");
- Turn on LED2.
- loop forever.
LED0 and LED1 turn on. LED2 does not. I have no means of debugging effectively at that point (JTAG won't work at this point).
According to the documentation, this should not turn off the clocks, since I am not touching the clock domains (just the sources). But it does. If instead of asm volatile (" WFI"), I keep turning on and off LEDs (not through a loop, just a series of volatile GPIO register modifications), it will go through some of them before going to sleep.
I have set the CAN to do a wakeup interrupt. I can verify the interrupt works when the clocks are not asleep. I can also verify that the CAN device is able to leave its local powerdown mode if the clocks are not asleep (I can't say anything about it when the clocks are asleep).
I have also set the GPIO to do a regular interrupt. This one triggers without issues if done before the clocks are asleep. No reaction when the clocks are asleep.
I have verified that the VIM module's wakeup mask registers are all 0xFFFFFFFF (not trying to be precise just yet, it doesn't even work with all signals allowed).
My main indicator that the clocks are indeed asleep is the power usage, which drops significantly.
Trying different "Wakup [sic] Src" and "Power Down Src" settings with HALCoGen does not appear to have any effect. I would expect an change in power usage if all clocks are re-enabled, anyway.
Am I missing something obvious there?
Can I have a decisive answer on whether the TMS570LC4357 supports waking up through CAN/SCI/GIO from having all clocks disabled?
Cheers.