Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[PIC32] PIC32MX how to clear WDT ?

Status
Not open for further replies.

pic.programmer

Advanced Member level 3
Joined
Aug 19, 2015
Messages
773
Helped
141
Reputation
284
Reaction score
140
Trophy points
43
Activity points
7,531
I am using PIC32MX795F512L and mikroC PRO PIC32. I want to know how to clear WDT in code. I have to implement WDT for proper functioning of the device.

In PIC I was using

Code:
asm clrwdt

but for PIC32 it is not working.
 

9.3.4 Resetting the WDT Timer
The WDT is cleared by any of the following:
• On any device Reset.
• By a WDTCONSET = 0x01, or equivalent instruction, during normal execution. Refer to
Example 9-2.
• Exiting from IDLE or SLEEP mode, due to an interrupt
Did you ever tried to look in manual? 10 topics per day for simple basic questions.
 
OP - I suspect that you have not appreciated that the PIC18, PIC24, dsPIC33 and similar families of devices all operate using instructions that are (approximately) similar. The way they work means that you can fairly easily transition form one family to the next.
However the PIC32 families are MIPS based and they work is quite a different way. You cannot rely on techniques and code that work for the other families of devices and therefore you must refer to the data sheet and other documentation for the device.
Susan
 
Thank you people.

I used this in mikroC PRO PIC32 Code to clear the WDT.


Code C - [expand]
1
WDTCLR_bit = 1;

 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top