|
Forum Index : Microcontroller and PC projects : OPTION AUTORUN
| Author | Message | ||||
| CaptainBoing Guru Joined: 07/09/2016 Location: United KingdomPosts: 2171 |
mainly @GeoffG, @MatherP I have a question regarding processor exceptions. When one occurs and OPTION AUTORUN is on, what should be the procedure? I think there is a catch 22 situation because if the firmware crashes, the CPU restarts but then you get another exception.... you can't break out of the loop, Ctrl-C does nothing. The reset (!'s on reset snaps it out) but it is drastic measure. Of course Autorun is valuable for a deployed project, you don't want it sat at the prompt doing nothing when there has been a problem, but how to break out of a crash-restart-crash... loop? I have exactly that situation on my bench now: [code] Option error - Cleared OPTION TOUCH Processor rest Option error - Cleared OPTION TOUCH Processor rest Option error - Cleared OPTION TOUCH Processor rest Option error - Cleared OPTION TOUCH Processor rest Option error - Cleared OPTION TOUCH Processor rest etc... [/code] It's just one of WW Mk2 44 pinners on a breadboard screaming round in circles with nothing attached MM.ver=5.0408 I encountered just this situation when discovering a feature of the inbuilt editor in The FASTCOUNT thread from PeterM, but it made me think if this occured in real life (it hasn't) |
||||
| Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3308 |
Good point. AUTORUN should be disabled if a processor exception is detected. The only problem (as you said) is that would cripple a Micromite in an embedded situation. I could imagine some event (cosmic ray strike?) that would cause an exception and then the Micromite would not restart and appear dead. I will think on it. HOWEVER, having said that... it appears that you have a different issue (not caused by AUTORUN). It seems that something went wrong during bootup when configuring the touch option. That caused an exception and as a result MMBasic would have deleted the touch configuration and rebooted. Normally that would have fixed the problem and MMBasic would finally reach the command prompt (and perhaps autorun) but in your case the problem remained causing the endless sequence of reboots. I will dig through the code to try and find the cause. Geoff Geoff Graham - http://geoffg.net |
||||
| CaptainBoing Guru Joined: 07/09/2016 Location: United KingdomPosts: 2171 |
I have never experienced this before in two years of using MMs with some in pretty hostile environments (121 degrees of steam at 2 atmospheres for 27 minutes, eight times a day is the worst, although the mite is well insulated) so I would temper your "diggings" with the knowledge it is really obscure and I am probably the only one to have had this problem. I am going to flash the MM to the latest version later today and run the same tests again. It might be I have some weird local corruption (seen that). Please bear in mind that the above occurred after that odd EDIT thing, so the problem could be (very likely to be) a knock on from that. All the best EDIT: PeterM pointed out that the CSub concerned would do weird stuff if I didn't stop it running in the background in a controlled manner - Ctrl-C is not controlled unless I then go on to issue the stop command at the prompt. Sure enough after doing this I can EDIT without issues. TBH Geoff, I wouldn't really spend too much time on hunting this down as it could literally be anywhere and is preventable. cheers |
||||
CircuitGizmos![]() Guru Joined: 08/09/2011 Location: United StatesPosts: 1427 |
I had this happen less than a year ago. And, since it was that long ago, I don't remember what I did to change/fix it. Micromites and Maximites! - Beginning Maximite |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |