S32K118 Watchdog Issue

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

S32K118 Watchdog Issue

Jump to solution
182 Views
bjs
Contributor III

Hi,

I have a demo project developed on s32k118evb board with watchdog disabled and it works well but after I download the project to my prototype PCB board the program triggers a watchdog timeout. 

Is there anything I missed to disable the watchdog timer?

====== Below is the board initialization code ======   

/* Board Initialization */
void Board_Init()
{
#if 1
DISABLE_INTERRUPTS(); // disable global interrupt
WDOG->CNT=0xD928C520;     /* Unlock watchdog */
WDOG->TOVAL=0x0000FFFF;    /* Maximum timeout value */
WDOG->CS = 0x00002100;    /* Disable watchdog */
ENABLE_INTERRUPTS(); // enable global interrupt
#endif
/* Clock */
CLOCK_DRV_Init(&clockMan1_InitConfig0);
 
PINS_DRV_Init(NUM_OF_CONFIGURED_PINS, g_pin_mux_InitConfigArr);
 
/*** SPI ***/
LPSPI_DRV_MasterInit(MLX,&mlxState,&mlx_MasterConfig0);
 
/*** LPIT ***/
LPIT_DRV_Init(INST_LPIT1, &lpit1_InitConfig);
LPIT_DRV_InitChannel(INST_LPIT1, CHAN_0, &lpit1_ChnConfig0);
INT_SYS_InstallHandler(LPIT0_IRQn, &LPIT_ISR, (isr_t *)0);
LPIT_DRV_StartTimerChannels(INST_LPIT1, CHAN_0_MASK);
 
/*** CAN ***/
/* Initialize can pal instance */
/* !!! PE clock source MUST be peripheral clock !!! */
CAN_Init(&hscan_instance, &hscan_Config0);
 
/* Set buffer configuration */
CAN_ConfigTxBuff(&hscan_instance, TX_MAILBOX, &TxbuffCfg);
 
msg.id = HSCAN_ID;
msg.cs = 0U;
msg.length = 8;
 
/*** SBC Control ***/
// Set SBC control pin to enter normal mode
PINS_DRV_SetPins(STBN_PORT, STBN_PIN);
}
 
0 Kudos
Reply
1 Solution
150 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi

If you are using the S32K1 SDK examples, there is DISABLE_WDOG in system_S32K118.c and system_S32K118.h that can be used to disable the watchdog:
/SDK/platform/devices/S32K118/startup/system_S32K118.c

DISABLE_WDOG system_S32K118.png

But I don't understand why it runs normally on S32K118EVB but errors occur on your prototype PCB board. Have you compared the differences between crystal circuits?


Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

 

View solution in original post

0 Kudos
Reply
1 Reply
151 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi

If you are using the S32K1 SDK examples, there is DISABLE_WDOG in system_S32K118.c and system_S32K118.h that can be used to disable the watchdog:
/SDK/platform/devices/S32K118/startup/system_S32K118.c

DISABLE_WDOG system_S32K118.png

But I don't understand why it runs normally on S32K118EVB but errors occur on your prototype PCB board. Have you compared the differences between crystal circuits?


Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

 

0 Kudos
Reply