Hello
I m using CW V 3.1 for programmming and debug MC9s12DG128 microcontroller. When i use __RESER_WATCHDOG(); functions in main.c it gives an error that " C10011 : ' :' expected to delimit label". but all of helper application or example application uses it. Could you say me what is wrong?
And i m also using _FEED_COP. But there is no error if i use it.
the diffirences beetwen them is that __RESET_WATCHDOG(); function is defined in "mc9s12dg128.h" file whereas the _FEED_COP() function is defined in "hidef.h" file.
these are functions declarations;
#define __RESET_WATCHDOG() {asm sta COPCTL;} // in the mc9s12dg128.h
#define _FEED_COP() ((*(volatile unsigned char*)_COP_RST_ADR)= 0x55,
(*(volatile unsigned char*)_COP_RST_ADR)= 0xAA)
and also i think that it is wrong to use __RESET_WATCHDOG(); function because you are not giving 0x55 and 0xAA value with in turn in which shape has been decleared in datasheet.
am i rigth to think that the _FEED_COP(); function must be used to reset watchdog.?
best regards.