Compiling an existing PIC32 project using the v2.00 C compiler produces a continual watchdog reset. This problem does not appear using the previous v1.12 compiler. Changing the watchdog postscaler value (up to 1048 seconds) has no effect. The watchdog reset occurs almost immediately after startup, definitely not enough time for the timer to expire. Disabling the watchdog allows the code to run as expected.
There was a change to the startup code in v2.00, but I am not using any custom startup code to my knowledge. Could there be a problem with the timer used by the watchdog not being enabled correctly? Where should I look to try and debug this issue?
The reset occurs when I clear the watchdog timer. If I use
WDTCONSET = 0x01; // or WDTCONbits.WDTCLR = 1; // or ClrWdt();
The reset will occur.
If I don't reset the watchdog timer (let the timer expire), I get a reset after the time specified by the postscalar, as expected.