I have a new board and when I go to disable the watchdog - it throws a hard reset. This is using Processor Expert generated code.
Here is the generated startup:
void __thumb_startup(void);
__asm void __thumb_startup(void) {
IMPORT __init_hardware
IMPORT __main
LDR R0, =__init_hardware
BLX R0
LDR R0, =__main
BX R0
ALIGN 4
}
And the rest of it:
/*lint -esym(765,__init_hardware) Disable MISRA rule (8.10) checking for symbols (__init_hardware). The function is linked to the EWL library */
/*lint -esym(765,Cpu_Interrupt) Disable MISRA rule (8.10) checking for symbols (Cpu_Interrupt). */
void __init_hardware(void)
{
/*** !!! Here you can place your own code before PE initialization using property "User code before PE initialization" on the build options tab. !!! ***/
/*** ### MK60FX512VLQ15 "Cpu" init code ... ***/
/*** PE initialization code after reset ***/
SCB_VTOR = (uint32_t)(&__vect_table); /* Set the interrupt vector table position */
/* Disable the WDOG module */
/* WDOG_UNLOCK: WDOGUNLOCK=0xC520 */
WDOG_UNLOCK = WDOG_UNLOCK_WDOGUNLOCK(0xC520); /* Key 1 */ <--- never gets past here
/* WDOG_UNLOCK: WDOGUNLOCK=0xD928 */
WDOG_UNLOCK = WDOG_UNLOCK_WDOGUNLOCK(0xD928); /* Key 2 */
And the ISR it jumps to is:
PE_ISR(Cpu_ivINT_Hard_Fault)
{
/* This code can be changed using the CPU bean property "Build Options / Unhandled int code" */
/* asm (HALT) */
}
It never gets to main.
I have another project (a native Keil project) that does get past this point...I just don't know why this ISR keeps tripping....nothing has been done on the processor yet. I can't even get to the CLK config before it halts using Processor Expert. I can't use my native Keil project because I want to use the LDD drivers from Processor Expert.