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);
}