I was testing a new breadboard layout and PIC config; to make sure I had a heartbeat before piling more code.
I was testing a new breadboard layout and PIC config; to make sure I had a heartbeat before piling more code.
My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.
Not as dumb as yesterday, but stupider than tomorrow!
Since on power up the SEN bit of the WDTCON0 register is at 0 (Watchdog disabled), why does that chip resets itself?
Ioannis
Because if the WDTE bits in CONFIG3 is anything but 0b01 the SEN bit is ignored and the CONFIG block of the code contains _WDT_ON which, according to the .INFO file for the device meansIf you want software control of the WDT you could chooseCode:_WDTE_ON ;WDT enabled regardless of sleep; SWDTEN ignored/Henrik.Code:_WDTE_SWDTEN ;WDT enabled/disabled by SWDTEN bit in WDTCON0
But then I see no way that PBP is aware of that or can reset the WDT.
Ioannis
My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.
Not as dumb as yesterday, but stupider than tomorrow!
Basically the CONFIG settings allows you to force the WDT either on/off OR allow the program to turn it on/off at runtime.
As for resetting/clearing it, as long as you don't DEFINE NO_CLRWDT 1 PBP will clear/reset the WDT by inserting CLRWDT instructions into the code - it doesn't matter if the WDT is actually enabled, disabled, running or not. The instructions will be embedded in the assembly listing of the program. Unless, apparently, you do this kind of super tight loop.
Does it matter if it is a tight loop in PBP? If it was in assembly I could understand, but in Basic? Seems like a bug.
Ioannis
Bookmarks