WATCHDOG ISSUE


Author Message
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 1054
Posted: 06:30am 09 Oct 2025      

This one might be for Peter, would it be possible to supply the last line number when the WATCHDOG TIMEOUT message is displayed?

OA47

OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 1054
Posted: 02:40am 02 Nov 2025      

As I have mentioned in older posts, I have a project based on an ARMITE F4 that is regularly giving me a WATCHDOG TIMEOUT but also clears the program memory at that point. The ARMITE F4 is running version 5.07.02.03. I raised the question of getting hold of the last line number executed to try and get some information to fix the software. If I set TRACE ON to monitor where the program is, the TRACE seems to stop after a short time and I am not sure whether this is an issue with TERATERM buffer or something else in MMBasic.

Can anyone tell me why the TRACE stops even though the program keeps running or have any ideas of trapping the problem?

OA47

EDNEDN
Guru

Joined: 18/02/2023
Location: United States
Posts: 307
Posted: 04:19am 02 Nov 2025      

  OA47 said  
Can anyone tell me why the TRACE stops even though the program keeps running or have any ideas of trapping the problem?

OA47


https://www.thebackshed.com/forum/ViewTopic.php?PID=246447#246447#246447

EDNEDN
Guru

Joined: 18/02/2023
Location: United States
Posts: 307
Posted: 10:38pm 02 Nov 2025      

  OA47 said  This one might be for Peter, would it be possible to supply the last line number when the WATCHDOG TIMEOUT message is displayed?

OA47


Or...  If you put your program onto a PicoMite, MMDebug now captures Watchdog Timer events.

Check out:    MMDebug-with-Watchdog-timer-support

OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 1054
Posted: 11:48pm 02 Nov 2025      

  Quote  If you put your program onto a PicoMite, MMDebug now captures Watchdog Timer events.


I tried to do this but the PiPico did not have enough I/O so I have tried the 2350B but I have run into major issues with software incompatibilities.

EDNEDN
Guru

Joined: 18/02/2023
Location: United States
Posts: 307
Posted: 11:54pm 02 Nov 2025      

  OA47 said  
  Quote  If you put your program onto a PicoMite, MMDebug now captures Watchdog Timer events.


I tried to do this but the PiPico did not have enough I/O so I have tried the 2350B but I have run into major issues with software incompatibilities.


OK!  I certainly understand!  

But at 40,000 feet, you have made a valuable contribution by asking for help with the Watchdog timer.   It turns out, it was only a handful of lines of code to add that.

Thanks!

Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 9173
Posted: 08:38am 03 Nov 2025      

I'm interested in the incompatibilities between the Pico and Pico 2. The Pico 2 is supposed to be a plug-in replacement.

The Pico 2 and the 2350B only differ in the number of pins that are available. They are the same silicon.

OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 1054
Posted: 08:58am 03 Nov 2025      

  Quote  I'm interested in the incompatibilities between the Pico and Pico 2. The Pico 2 is supposed to be a plug-in replacement.


Mick the incompatibilities are between the F4 MMBasic and the Pico MMBasic. Particularly where I can use the F4 pin numbers in an array as they are in sequence but the pin numbers of the 2350B are not.

OA47

JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4386
Posted: 11:18am 03 Nov 2025      

Could you use an extra array and look up the pin numbers via that?

i.e. an extra level of indirection

(The array for the F4 would be in effect pointless but the Pico one would be useful.)

John

phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3407
Posted: 12:00pm 03 Nov 2025      

GPx numbers are contiguous so you can do this:-
> for n=0 to 7 :? mm.info(pinno "GP"+str$(n)), : setpin mm.info(pinno "GP"+str$(n)),DIN: next
1       2       4       5       6       7       9       10
>

It skips over the ground pins without needing gaps.
.
Edited 2025-11-03 22:05 by phil99

Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 9173
Posted: 12:22pm 03 Nov 2025      

It's bad practice to use module pin numbers rather than GPxx numbers. The latter are used in the Datasheet documents for the chips and are also used by MMBasic. Module pin numbers are liable to change with every new module that's released, meaning that you get compatibility issues further down the line. e.g. module pin 1 of a Pico 2 is GP00 and is GND on a PGA2350.

PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 2084
Posted: 02:29pm 03 Nov 2025      

Without knowing what you need to achieve, can't you make PORT work?