K64 SDK Watchdog example not working

cancel
Showing results for 
Search instead for 
Did you mean: 

K64 SDK Watchdog example not working

49 Views
Senior Contributor II

Hi,

I have used a couple of the SDK examples no problem on the latest K64 SDK in the latest MCUXpresso.

The WDOG example however is just a blank project with nothing in it

The issue is I have configured the watchdog and enabled it in my K64 project without an example and the watchdog fires before it ever gets to main (during bss init).

I have no problem with any other examples other than WDOG, and I really need to be able to do a simple task like use the watchdog without it firing before main is running.

CarlFST60L_0-1599975951482.png

 

The main code looks liek this

 

int main(void) {

/* Init board hardware. */
BOARD_InitBootPins();
BOARD_InitBootClocks();
BOARD_InitBootPeripherals();
/* Init FSL debug console. */
BOARD_InitDebugConsole();

PRINTF("Hello World\n");

/* Force the counter to be placed into memory. */
volatile static int i = 0 ;
/* Enter an infinite loop, just incrementing a counter. */
while(1) {
i++ ;
/* 'Dummy' NOP to allow source level single stepping of
tight while() loop */
__asm volatile ("nop");
}
return 0 ;
}

 

And there is nothing about a watchdog in boot peripherals, and the K64 header has 

#ifndef DISABLE_WDOG
#define DISABLE_WDOG 1
#endif

no example I have have the watchdog enabled, and enabling doesnt work using the driver... 

0 Kudos
3 Replies

20 Views
NXP TechSupport
NXP TechSupport

Hi

Please refer to my attached file.

 

Regards

Daniel

0 Kudos

32 Views
NXP TechSupport
NXP TechSupport

Hi

There is a wdog demo in latest SDK that demonstrate the SDK wdog driver.

danielchen_0-1600327065246.png

 

You can refer to it.

 

Regards

Daniel

0 Kudos

27 Views
Senior Contributor II

When I load the example its an empty project. Can you attach it? I'm not sure why all project examples except wdog work on my side build. There is a problem with the sdk because they all work except that single example.

0 Kudos