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.

TMS570LC4357: Suggested software flow to enter/exit the low-power mode of TMS570LC4357 MCU

Part Number: TMS570LC4357
Other Parts Discussed in Thread: TMS570LS0714

Tool/software:

Hello,

Reading the section of TMS570LC43x TRM, section 2.4.3.1:

And also having the API "void systemPowerDown(uint32 mode)" available:

/* SourceId : SYSTEM_SourceId_007 */
/* DesignId : SYSTEM_DesignId_007 */
/* Requirements : HL_CONQ_SYSTEM_SR8 */
void systemPowerDown(uint32 mode)
{

/* USER CODE BEGIN (23) */
/* USER CODE END */

/* Disable clock sources */
systemREG1->CSDISSET = mode & 0x000000FFU;

/* Disable clock domains */
systemREG1->CDDIS = (mode >> 8U) & 0x00000FFFU;

/* Idle CPU */
/*SAFETYMCUSW 88 S MR:2.1 <APPROVED> "Assembly in C needed" */
_gotoCPUIdle_();

/* USER CODE BEGIN (24) */
/* USER CODE END */

}

It is still not clear to us on how exactly to enter and exit the low-power mode of the MCU (Sleep):

  1. What is the proper way to invoke the systemPowerDown function?
  2. Is any additional user code needed in the systemPowerDown function, to match the TMS570LC43x section 2.4.3.1 as shown above?

Please advise. Thank you.

John

  • Hi John,

    We have a low power mode example:

    TMS570LS0714PZ_LPMs_Wakeup.zip

    Here they gave the code to enter and exit from different low power modes like Sleep, doze and snooze etc.

    Please refer the code and understand the flow, if this doesn't help you then i will try to provide further assistance on this.

    --
    Thanks & regards,
    Jagadish.

  • Hi Jagadish,

    Thank you for the example code, which is for TMS570LS0714, and I will take a look at it.

    In the example code, I also see the function 'systemPowerDown' (in ...\source\system.c). Could you please let me know the proper input parameters to use, when calling this function? Is it correct that calling this one function alone, we can enter/exit the low-power (sleep) mode of the TMS570LC43 that we are targeting to use?

    Please advise. Thank you.

    John

  • Hi John,

    The mode input passing to the systemPowerDown will decide the type of mode we want to implement.

    For example, if you verify the doze mode routine in my shared code,

    Here we are turning off all the clock sources except main oscillator, to do this we are writing 0xFE to the CSDISSET register.

    And similarly, we are turning off all the clock domains except RTICLK, to do this we are writing 0xFFBF to the CDDISSET register.

    So, if we want to implement same mode using systemPowerDown API then we should call this function like below:

    systemPowerDown(0xFFBFEF);

    Similarly,

    to implement sleep mode using systemPowerDown  API then we should call this function as below

    systemPowerDown(0xFFFFFF);

    --
    Thanks & regards,
    Jagadish.

  • Hi Jagadish,

    Thank you for the feedback. it also looks like just doing "systemPowerDown(0xFBFEF);" and "systemPowerDown(0xFFFFF);" would be sufficient (i.e. 5 hex digits) to enter Doze and Sleep modes of TMS570LC43x.

    Thank you, and again, I will look into the sample code that you sent over.

    John