Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 08:23 26 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : PM: firmware crashes....

Author Message
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9306
Posted: 10:31pm 29 Feb 2024
Copy link to clipboard 
Print this post

Hi all.

I have several boards now based on the RP2040 Zero module from WaveShare, becasue it is small and runs the MMBASIC Pico port just fine - usually.

I have a situation, where, for no apparent reason, the firmware seems to crash.
I have no idea really, why this should be.
The unit can go WEEKS of 24/7 with no problems, then it can just crash.
And when I mean crash, I mean crash - the console is gone, nothing works, the buttons don't do anything, and you can only get it back, by cycling the power or pressing the on-board "RESET" tact switch to force the 2040 to reset - then it works again.

I have used the WATCHDOG command in the code, which should be making use of the 2040's built-in watchdog - see the RP2040 datasheet, page 566, section 4.7

Please can someone(Peter?) confirm that MMBASIC for the 2040, does indeed use the 2040's watchdog, or is this watchdog running inside the MMBASIC interpreter, so that if MMBASIC crashes, this would also crash the watchdog timer.

Yes?
No?

I'm at the stage of thinking I should just add an external watchdog IC, such as the Microchip MIC706 for example(only a buck each), but they all expect a 5v MCU system voltage, and the 2040 is 3v3, so IF I decided to add an external watchdog IC, I would need to find a way to interface that 5v chip, to the 3v3 "RUN" pin on the 2040 chip, but I am sure it can be done without too much of a problem - one "Channel" of one of those MOSFET-based level-corrector thing-y's would probably do the job nicely.

Thoughts and comments welcome.
Smoke makes things work. When the smoke gets out, it stops!
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2135
Posted: 11:17pm 29 Feb 2024
Copy link to clipboard 
Print this post

Microchip MIC706 datasheet says Vcc 1.4 - 5.5V
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6098
Posted: 11:21pm 29 Feb 2024
Copy link to clipboard 
Print this post

Are you using WATCHDOG HW xx
The HW watchdog is more robust but has a limited timeout.

Jim
VK7JH
MMedit   MMBasic Help
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9306
Posted: 11:23pm 29 Feb 2024
Copy link to clipboard 
Print this post

I know, but the datasheet is confusing, cos in all the examples, they talk about a 5v supply - see the diagram on page 2...

Chart on page 3 says Vcc of 1.4v to 5.5v, but then goes on to mention a "Reset Voltage Threshold" of 4.4v(for the MIC706)

How can you have a reset threshold, that is higher then the supply voltage?
I don't really understand that bit of the datasheet, and am thinking that as soon as you supply it with LESS then 4.4v, it will assert /RESET and never come out of it if VCC remains lower then that.

If you can clarify this head-scratcher, that would be wonderful.  
Smoke makes things work. When the smoke gets out, it stops!
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9306
Posted: 11:25pm 29 Feb 2024
Copy link to clipboard 
Print this post

  TassyJim said  Are you using WATCHDOG HW xx
The HW watchdog is more robust but has a limited timeout.

Jim


NO.

Was unaware of that variation of the WATCHDOG command.
My manual does not say anything in the COMMANDS section about "WATCHDOG HW", just the standard watchdog command.  PM manual version 5.07.06, Revision 1.

EDIT: A-HA!!!!!

I'm using an out of date manual.  Have just grabbed the latest one from Geoff's website. (Version 5.08.00, Revision 4)
Edited 2024-03-01 09:30 by Grogster

Footnote added 2024-03-01 09:32 by Grogster
I've just read the updated manual about WATCHDOG HW, and I will implement that in the code rather then the standard one, and see if that helps me.
Smoke makes things work. When the smoke gets out, it stops!
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2135
Posted: 11:35pm 29 Feb 2024
Copy link to clipboard 
Print this post

Maybe we are using different datasheets. The one I have says it is intended for 3V systems and voltage monitoring is via a external voltage divider so can be set to whatever you want.
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9306
Posted: 11:55pm 29 Feb 2024
Copy link to clipboard 
Print this post

My datasheet came from Microchip:


MIC705 MCU Watchdog Timer IC.pdf
Smoke makes things work. When the smoke gets out, it stops!
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024