Watch Dog Timer

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 8.

Moderator: Benj

Post Reply
keejay
Flowcode v5 User
Posts: 115
Joined: Tue Jul 23, 2013 10:02 am
Been thanked: 15 times
Contact:

Watch Dog Timer

Post by keejay »

Hi,

I'm getting a compile error when I try to clear the watch dog timer with C-Code block. It worked great in version 6. I'm using:

clear_wdt();

and get the following error when I try an compile the program in FC8:


C:\ELECTR~1\PROJECTS\G_Lert\SOFTWA~1\V2>C:\PROGRA~2\Flowcode\Common\COMPIL~1\pic\batch\..\bin\xc8.exe --chip=18F46K22 "401.c" --MSGDISABLE=359,1273,1388 --FLOAT=32 --DOUBLE=32
Microchip MPLAB XC8 C Compiler (Free Mode) V1.45
Build date: Nov 15 2017
Part Support Version: 1.45
Copyright (C) 2017 Microchip Technology Inc.
License type: Node Configuration

. . .

401.c: FCM_SMS_RESPONSE()
7067: clear_wdt();
^ (361) function declared implicit int (warning)
. . . . . . .

using updated 32-bit floating-point libraries; improved accuracy might increase code size
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

0: (499) undefined symbol:
_clear_wdt(401.obj)
. . . .

(908) exit status = 1
(908) exit status = 1

Error returned from [xc8.exe]

C:\Program Files (x86)\Flowcode\Common\Compilers\pic\batch\pic_xc8_comp.bat reported error code 1



FINISHED

keejay
Flowcode v5 User
Posts: 115
Joined: Tue Jul 23, 2013 10:02 am
Been thanked: 15 times
Contact:

Re: Watch Dog Timer

Post by keejay »

If I disable all the clear_wdt(); then the programs compiles successfully.

keejay
Flowcode v5 User
Posts: 115
Joined: Tue Jul 23, 2013 10:02 am
Been thanked: 15 times
Contact:

Re: Watch Dog Timer

Post by keejay »

It appears as though

ClrWdt();

compiles without errors

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Watch Dog Timer

Post by Benj »

Hello,

We support the function like this in v6, v7 and v8 to remove the need for using compiler specific syntax.

Code: Select all

MX_CLEAR_WATCHDOG;
This should work on various targets which support watchdog timers, e.g. PIC, AVR etc.

Post Reply