S32k312 WatchDog Reset Reason Not Be Catched In RTD3 MCAL

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32k312 WatchDog Reset Reason Not Be Catched In RTD3 MCAL

Jump to solution
126 Views
kontroller
Contributor II

I am developing the bootloader of s32k312 under the environment of SDS3.5 software RTD300, and found that after SWT0 triggered the reset of the chip, the reset I read in the boot was PowerOnReset instead of SWT0_RESET.

What's more strange is that, I can do this in RTD200-MCAL and RTD300-Driver, but only RTD300-MCAL has this problem.

I want to know how to fix this problem in RTD300-MCAL

I packaged the three control projects in zip files, and the control results are shown in the figure:

rtd3_driver.pngrtd3_mcal.pngrtd2_mcal.png

 

code:

extern Power_Ip_ResetType Power_Ip_GetResetReason(void);

void Wdg_CallBackNotification0(void)
{
format_print("swt0 interrupt callback \r\n");
}
int main(void) {

uint8 temp_rstrsn = 0U;

Clock_Ip_Init(&Clock_Ip_aClockConfig[0]);
Siul2_Port_Ip_Init(NUM_OF_CONFIGURED_PINS0,g_pin_mux_InitConfigArr0);

IntCtrl_Ip_InstallHandler(SWT0_IRQn, Swt_Ip_Swt0_Isr, NULL_PTR);
IntCtrl_Ip_EnableIrq(SWT0_IRQn);

Lpuart_Uart_Ip_Init(LPUART_UART_IP_INSTANCE_USING_6, &Lpuart_Uart_Ip_xHwConfigPB_6);


format_print("==========================================================\r\n");
format_print("s32k312_rtd300_swt0_reset_ip_test:\r\n");

temp_rstrsn = Power_Ip_GetResetReason();
format_print("reset reason: %d \r\n",temp_rstrsn);

Swt_Ip_Init(SWT_INST,&Swt_Ip_Cfg0);

while (1) {
}

return exit_code;
}

0 Kudos
1 Solution
93 Views
kontroller
Contributor II

I finally found a solution to this problem, it is required to turn on the PLL peripheral clock under RTD-MCAL, it is not required under RTD-DRIVER, although I do not understand why yet, thank you very much to the forum experts

kontroller_0-1713150009091.png

 

View solution in original post

0 Kudos
1 Reply
94 Views
kontroller
Contributor II

I finally found a solution to this problem, it is required to turn on the PLL peripheral clock under RTD-MCAL, it is not required under RTD-DRIVER, although I do not understand why yet, thank you very much to the forum experts

kontroller_0-1713150009091.png

 

0 Kudos