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 ZealandPosts: 9306 |
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: AustraliaPosts: 2135 |
Microchip MIC706 datasheet says Vcc 1.4 - 5.5V |
||||
TassyJim Guru Joined: 07/08/2011 Location: AustraliaPosts: 6098 |
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 ZealandPosts: 9306 |
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 ZealandPosts: 9306 |
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: AustraliaPosts: 2135 |
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 ZealandPosts: 9306 |
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 |