Feb 29, 2020
10:05 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 29, 2020
10:05 AM
Hello!
I'm trying to enter standby mode on TC23x controller and to wake it up by PINA signal, but it doesn't work...
Here is my code:
.standby_code is PMI_PSPR (Scratch-Pad RAM (PSPR)) section.
Does anyone have an experience with low-power modes on Aurix MCUs?
I'll be very happy to get any suggestions...
Thanks in advance!!!
I'm trying to enter standby mode on TC23x controller and to wake it up by PINA signal, but it doesn't work...
Here is my code:
uint16 safetyWdtPw = IfxScuWdt_getSafetyWatchdogPassword();
IfxScuWdt_clearSafetyEndinit(safetyWdtPw);
uint16 cpuWdtPw = IfxScuWdt_getCpuWatchdogPassword();
IfxScuWdt_clearCpuEndinit(cpuWdtPw);
CopyStandbyRedundancyData();
EnterStandbyMode();
__attribute__((section(".standby_code")))
void EnterStandbyMode(void) {
FLASH0_FCON.B.SLEEP = 1;
while(0 == FLASH0_FSR.B.SLM) {
}
MODULE_SCU.PMSWCR1.B.IRADIS = 0;
MODULE_SCU.PMSWCR0.B.STBYRAMSEL = 0x1;
MODULE_SCU.PMSWCR0.B.PINAEDCON = 0x3;
MODULE_SCU.PMSWCR0.B.PINADFEN = 0x1;
MODULE_SCU.PMSWCR0.B.ESR0TRIST = 1;
MODULE_SCU.PMSWCR0.B.PINAWKEN = 0x1;
MODULE_SCU.PMSWCR1.B.STBYEVEN = 1;
MODULE_SCU.PMSWCR1.B.STBYEV = 0x0;
MODULE_SCU.PMCSR[0].B.REQSLP = 0x3;
}
void CopyStandbyRedundancyData(void){
uint32_t *src = (uint32_t *)0xD0002000;
volatile uint32_t data;
uint32_t i = 0;
for (i = 0; i < 16; i++)
{
data = *src;
if ((0 == data) || (0xFFFFFFFF == data))
{
src++;
}
else
{
*src = *(uint32_t *) (data);
src++;
}
}
__isync();
__dsync();
}
.standby_code is PMI_PSPR (Scratch-Pad RAM (PSPR)) section.
Does anyone have an experience with low-power modes on Aurix MCUs?
I'll be very happy to get any suggestions...
Thanks in advance!!!
1 Reply
Mar 02, 2020
06:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 02, 2020
06:18 AM
I would suggest that the Safety EINIT is closed before you write to the PMCSR0 register and only use the CPU EINIT to write to the PMCSR0 register to enter standby mode. Only after CPU ENDINIT bit is set back after REQSLP is written would the REQSLP take effect.