Aug 16, 2019
11:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 16, 2019
11:24 AM
Hi,
I.m tryning to enter standby mode and I'm getting constant trap when i try to assign (with 1)
I disabled WTD using this functions
my full code is:
why i still geting trap there ?
I use Tc222L
I.m tryning to enter standby mode and I'm getting constant trap when i try to assign (with 1)
PMSWCR1.B.IRADIS bit
I disabled WTD using this functions
uint16 cpu_wdt_password = IfxScuWdt_getCpuWatchdogPassword();
IfxScuWdt_clearCpuEndinit(cpu_wdt_password);
my full code is:
void init_ifx_standby_mode(void){
uint16 cpu_wdt_password = IfxScuWdt_getCpuWatchdogPassword();
IfxScuWdt_clearCpuEndinit(cpu_wdt_password);
qspi_module->CLC.B.DISR = 1;
asclin_module->CLC.B.DISR = 1;
can_module->CLC.B.DISR = 1;
gtm_module->CLC.B.DISR = 1;
scu->PMSWCR1.B.IRADIS = 1; // getting trap here
uint16 i = 200;
// about 200us dealy as DS says
while(i){
i--;
}
volatile Ifx_SCU_CCUCON0_Bits* con_0_bits = &scu->CCUCON0.B;
volatile Ifx_SCU_OSCCON_Bits* oscon_bits = &scu->OSCCON.B;
volatile Ifx_SCU_PLLCON0_Bits* pll_con_0_bits = &scu->PLLCON0.B;
// todo Lukas: handle infinite loop
while(con_0_bits->LCK != 0);
con_0_bits->CLKSEL =0;
while(con_0_bits->LCK);
/* update CCU register */
con_0_bits->UP = 1;
while(con_0_bits->LCK != 0);
/* set blocks into power saving modes */
oscon_bits->MODE = 3; //OSC disabled
pll_con_0_bits->VCOPWD = 1; //VCO
pll_con_0_bits->PLLPWD = 0; //PLL
...
}
why i still geting trap there ?
I use Tc222L
Labels
- Tags:
- IFX
1 Reply
Aug 16, 2019
12:06 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 16, 2019
12:06 PM
Problem solved. Turns out that there is also another safety module to disable, both of them need to be disabled.
uint16 cpu_wdt_password = IfxScuWdt_getCpuWatchdogPassword();
uint16 safety_password = IfxScuWdt_getSafetyWatchdogPassword();
IfxScuWdt_clearSafetyEndinit(safety_password);
IfxScuWdt_clearCpuEndinit(cpu_wdt_password);