Darrel, just checked the hardware file and these are the settings
If I read that then the WDT is running, and as I've not inserted DEFINE NO_CLRWDT 1 into the code then I assume that PBP has automatically inserted the resets through the code automatically. However on checking the corresponding asm file there are just the following references to CLRWDT in that file (towards the beginning)Code:ASM __CONFIG _CONFIG1H, _OSC_HSPLL_1H __CONFIG _CONFIG2L, _PWRT_ON_2L __CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_512_2H __CONFIG _CONFIG3H, _PBADEN_OFF_3H __CONFIG _CONFIG4L, _LVP_OFF_4L & _XINST_OFF_4L ENDASM
Code:;---[Add an Interrupt Source to the user's list of INT Handlers]-------------- INT_Handler macro IntFlagReg, IntFlagBit, Label, Type, Reset list local AfterSave, AfterUser, NoInt INT_Count += 1 PrList#v(INT_Count)R = IntFlagReg PrList#v(INT_Count)B = IntFlagBit PrList#v(INT_Count)Priority = Priority GetIntInfo IntFlagReg, IntFlagBit if (Found == YES) btfss INT_Enable_Reg, INT_Enable_Bit, 0 ; if INT is enabled goto NoInt btfss INT_Flag_Reg, INT_Flag_Bit, 0 ; and the Flag set? goto NoInt if (Priority == H) bsf _Serviced_H, 0 else bsf _Serviced_L, 0 endif ifdef NO_CLRWDT if (NO_CLRWDT != 1) CLRWDT endif else CLRWDT endif if (Type == PBP) ; If INT handler is PBP if (Priority == H) ifdef ReEnterHPused GetAddress21 AfterSave, RetAddrH L?GOTO _SavePBP_H ; Save PBP system Vars in HP INT else error "ReEnterPBP-18 must be INCLUDEd to use High Priority PBP interrupts" endif else ; Priority = L ifdef ReEnterLPused GetAddress21 AfterSave, RetAddrL L?GOTO _SavePBP_L ; Save PBP system Vars in LP INT else error "ReEnterPBP-18LP must be INCLUDEd to use Low Priority PBP interrupts" endif endif endif
I've searched for info on using the watchdog timer and came across Mel's post in 2003 ??? which helps explain how PBP uses the timer... but still a bit confused given the complexity of our code




Bookmarks