Hi Guys
I'm using this in a C code WDTClear() to reset the watchdog timer but when i compile it gives me this error. I've also tried CLRWDT(); and
#asm CLRWDT #endasm they all failing what code would you recommend?
28055: #warning "This interrupt has previously been enabled, so the macro <Getkey> may never get called."
^ (162) #warning: "This interrupt has previously been enabled, so the macro <Getkey> may never get called." (warning)
E-P_U6_V-4-6-2_W_ON_04-05-26_For-A7682E_AI_repair1.c: main()
14611: WDTClear()
^ (361) function declared implicit int (warning)
14612: ----------------------------------------
^ (202) only lvalues can be assigned to or modified
^ (202) only lvalues can be assigned to or modified
^ (202) only lvalues can be assigned to or modified
^ (202) only lvalues can be assigned to or modified
^ (202) only lvalues can be assigned to or modified
^ (202) only lvalues can be assigned to or modified
^ (202) only lvalues can be assigned to or modified
^ (202) only lvalues can be assigned to or modified
^ (202) only lvalues can be assigned to or modified
^ (202) only lvalues can be assigned to or modified
^ (202) only lvalues can be assigned to or modified
^ (202) only lvalues can be assigned to or modified
^ (202) only lvalues can be assigned to or modified
^ (202) only lvalues can be assigned to or modified
^ (202) only lvalues can be assigned to or modified
^ (202) only lvalues can be assigned to or modified
^ (202) only lvalues can be assigned to or modified
^ (202) only lvalues can be assigned to or modified
^ (202) only lvalues can be assigned to or modified
14615: }
^ (202) only lvalues can be assigned to or modified
E-P_U6_V-4-6-2_W_ON_04-05-26_For-A7682E_AI_repair1.c: 14615: too many errors (21)
(908) exit status = 1
(908) exit status = 1
Error returned from [xc8.exe]
C:\ProgramData\MatrixTSL\FlowcodeV9\FCD\PIC\batch\pic_xc8_comp.bat reported error code 0x1
Autoclose turned off
FINISHED
Watch dog timer reset V9
-
jollybv
- Posts: 148
- http://meble-kuchenne.info.pl
- Joined: Mon Mar 08, 2021 11:25 am
- Location: Cape Town South Africa
- Has thanked: 41 times
- Been thanked: 13 times
-
medelec35
- Valued Contributor
- Posts: 2286
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 711 times
- Been thanked: 774 times
Re: Watch dog timer reset V9
Hi Brian, I use within a c code block.
Don't forget to enable Auto clear watchdog within project options.
For c code you will require a semicolon when calling a function.
E.g. you shown WDTClear().
As its a function it should have a semicolon on the end, but it's still the wrong code to use.
Code: Select all
MX_CLEAR_WATCHDOG;Don't forget to enable Auto clear watchdog within project options.
For c code you will require a semicolon when calling a function.
E.g. you shown WDTClear().
As its a function it should have a semicolon on the end, but it's still the wrong code to use.
Martin
-
jollybv
- Posts: 148
- Joined: Mon Mar 08, 2021 11:25 am
- Location: Cape Town South Africa
- Has thanked: 41 times
- Been thanked: 13 times
Re: Watch dog timer reset V9
Thanks Martin what i found betwene me and Ai that i needed to change all the WDTClear() to
#asm
CLRWDT
#endasm
Then it compiled so all good for now just some other small issues to sort
#asm
CLRWDT
#endasm
Then it compiled so all good for now just some other small issues to sort