Other Parts Discussed in Thread: LAUNCHXL2-TMS57012, , TM4C129ENCPDT
Hi,
My app performs some taks every 10sec. I would like to go into low power mode to decrease power consumption (It will be almost all the time in low power mode.and it should be wake up every 10sec). I read TMS570LS12 TRM and I also saw few threads on e2e.
Currently I am working on LAUNCHXL2-TMS57012.
For GLCK = 160MHz (all clock domain working) current consumption ~ 145mA (10sec blinking LED).
After my code (below) power consumption decreases to ~75mA: Here is the code:
/* Wakeup Interrupt: RTI compare 0 */
vimREG->WAKEMASKCLR0 = 0xFFFFFFFF;
vimREG->WAKEMASKCLR1 = 0xFFFFFFFF;
vimREG->WAKEMASKCLR2 = 0xFFFFFFFF;
vimREG->WAKEMASKSET0 = (0x1 << 2); //rti 2
/* flash */
flashWREG->FBAC = (0x0F << 8) | (0x0F);
flashWREG->FBFALLBACK = 0x00000000U
| (uint32)((uint32)SYS_SLEEP<< 14U) /* BANK 7 */
| (uint32)((uint32)SYS_SLEEP << 2U) /* BANK 1 */
| (uint32)((uint32)SYS_SLEEP << 0U); /* BANK 0 */
flashWREG->FPAC1 = 0x00000000U; /* take the pump to sleep */
/* clocks */
systemREG1->GHVSRC = 0x00000000;
systemREG1->VCLKASRC= 0x00000000;
systemREG1->RCLKSRC = 0x00000000;
/* - Disable / Enable clock domain */
systemREG1->CDDIS = 0x0 //RTICLK is enabled for wakeup
| (uint32)((uint32)1U << 0U ) //GCLKOFF
| (uint32)((uint32)1U << 1U ) //HCLK OFF
| (uint32)((uint32)1U << 2U ) //VCLKP OFF
| (uint32)((uint32)1U << 3U ) //VCLK2 OFF
| (uint32)((uint32)1U << 4U ) //AVCLK 1 OFF
| (uint32)((uint32)1U << 5U ) //AVCLK 2 OFF
| (uint32)((uint32)1U << 8U ) //VCLK3 OFF
| (uint32)((uint32)1U << 9U ) //VCLK4 OFF
| (uint32)((uint32)1U << 11U); //AVCLK 4 OFF
systemREG1->CSDIS = (uint32)((uint32)1U << 1U) // OSCIN is enabled
|(uint32)((uint32)1U << 3U)
|(uint32)((uint32)1U << 4U)
|(uint32)((uint32)1U << 5U)
|(uint32)((uint32)1U << 6U)
|(uint32)((uint32)1U << 7U);
//Idle the Cortex-R4 core
asm( " NOP");
asm( " NOP");
asm( " NOP");
asm( " WFI"); //Wait For Interrupt (WFI) instruction
asm( " NOP"); //after wake-up, will start from this line
asm( " NOP");
asm( " NOP");
asm( " NOP");
asm( " NOP");
asm( " NOP");
I am not sure if everything is ok. What is the power counsumption in low power mode? Shouldn't it be less than ~75mA?
I suppose it should wake up after 10ces (RTI) but it does not work... Could you help me please?


