![]() |
Forum Index : Microcontroller and PC projects : Armite F4 loosing program
Author | Message | ||||
OA47 Guru ![]() Joined: 11/04/2012 Location: AustraliaPosts: 954 |
I may have posted a similar topic some time ago but still have not got a resolution. I have an Armite F4 unit in a remote location that I can monitor via Teamviewer software via the Win 10 PC it is connected to. The F4 is running MMB 5.07 and twice this year the unit has lost its program. I have replaced the F4 board in the hope it was a hardware issue. This latest failure was better in that I didn't have to travel to the unit but can access via the remote desktop software and Teraterm. Once connected the unit seemed to be in RUN mode and a CNTRL C got it back to a prompt. When I typed EDIT there was no program in memory. Does anyone have any ideas why this is happening or have a way that I can make these systems more reliable? 0A47 |
||||
disco4now![]() Guru ![]() Joined: 18/12/2014 Location: AustraliaPosts: 936 |
Which version of MMB 5.07 5.07.00 , 5.07.01 or 5.07.02 Versions prior to 5.07.02 will clear the program memory if the options look corrupt e.g flat RTC battery and power disrupted may cause RTC ram to corrupt which triggers a full reset on restart. The latest version 5.07.02 also allows the OPTIONs to be added to the program code so becomes immune to a flat battery except for loss of time. Link to latest in my signature. Gerry Latest F4 Latest H7 FotS |
||||
OA47 Guru ![]() Joined: 11/04/2012 Location: AustraliaPosts: 954 |
Thanks Gerry, the version on the F4 is 5.070202 so I thought I was out of the woods on this one. 0A47 |
||||
disco4now![]() Guru ![]() Joined: 18/12/2014 Location: AustraliaPosts: 936 |
A restart with PE3 held low would erase the program area. i.e. an MMBasic reset. The firmware puts an internal pullup on it before it tests. Are you using PE3 , could it be held low for any reason if you had a power restart or restart because of a false trigger on reset pin. Latest F4 Latest H7 FotS |
||||
OA47 Guru ![]() Joined: 11/04/2012 Location: AustraliaPosts: 954 |
PE3 is definitely used as a ground sensing input in the program. ![]() Dim ValvePin(16) ' PINS USED FOR MONITORING THE CONTROLLER 24V AC OUTPUTS (1-16) ' PE2,PE3,PE4,PE5,PE6,PB10,PC0,PC1,PC2,PC3,PA0,PA1,PA2,PA3,PC4,PB11 Data 1, 2, 3 , 4 , 5 ,47, 15 ,16, 17, 18, 23, 24, 25, 26, 33, 48 0A47 Edited 2024-12-13 14:42 by OA47 |
||||
disco4now![]() Guru ![]() Joined: 18/12/2014 Location: AustraliaPosts: 936 |
A restart with PE4 held low would switch to the Serial Console. USB console would not be available. Have you seen this. Are you using a 16bit display, the latest version allows the FSMC pins to be used if not using a parallel display. If moving pins is not an option I could do a version with MMBasic Reset moved to another pin say PC13 to prove the issue. Gerry Latest F4 Latest H7 FotS |
||||
OA47 Guru ![]() Joined: 11/04/2012 Location: AustraliaPosts: 954 |
Gerry, I am using a ILI9341_16 display and in the design I wanted 16 I/O pins available from the lower header. As the versions of MMB have evolved I have been struggling to get 16 I/O pins from the header (loosing PC13 due to conflicts with SD Card and now PB00 in version 5.07.02.) so any help would be appreciated. 0A47 |
||||
disco4now![]() Guru ![]() Joined: 18/12/2014 Location: AustraliaPosts: 936 |
Here is a version to try. It will not look at PE3 or PE4 pins during a restart. PC13 is now the pin that will cause an MMBasic Reset if it is held low during a restart. There is no option to trigger the Serial Console other than setting the Option via the USB console. PC13 should not interfere with SDCard as in normal operation it is unchanged,its only tested during a restart. > ARMmite MMBasic Version 5.07.02b3 (PC13 Reset) Copyright 2011-2024 Geoff Graham Copyright 2016-2024 Peter Mather ArmmiteF407PC13Reset.zip Gerry Latest F4 Latest H7 FotS |
||||
OA47 Guru ![]() Joined: 11/04/2012 Location: AustraliaPosts: 954 |
Thankyou Gerry, I will bench test the version and hopefully load it on site asap. 0A47 |
||||
OA47 Guru ![]() Joined: 11/04/2012 Location: AustraliaPosts: 954 |
@ Gerry Unfortunately after a week of service in the wild the Armmite F407 PC13 Reset version of firmware lost its Basic Program last night. I still had console control and I was able to AUTOSAVE a copy back on and restore the system. I have looked back through the log file and it last responded at 23:15 last night. OA47 |
||||
disco4now![]() Guru ![]() Joined: 18/12/2014 Location: AustraliaPosts: 936 |
Its a bit of a mystery. Was it the same as you originally found. i.e. needed a CNTL+C to to get to the prompt when you connected. Is the log being written to the SDCard on the F4. How is it powered ? When connecting from the PC is it via USB Console? Gerry Latest F4 Latest H7 FotS |
||||
OA47 Guru ![]() Joined: 11/04/2012 Location: AustraliaPosts: 954 |
I did try to take a screen shot and lost it with the remote access but I dont think I had to CNTRL-C, there was an error created during a write to the log file with a message something like: [189] Open CFN$ for Append As #4 Error : A hard error occurred The console had its banner with a prompt and I typed RUN to no avail and when I typed EDIT it showed no basic program. OA47 Edited 2025-02-01 11:37 by OA47 |
||||
OA47 Guru ![]() Joined: 11/04/2012 Location: AustraliaPosts: 954 |
I managed to scroll through the TeraTerm screens and found the screen info for the error the other day. ![]() But I have had the program wiped twice since then around 12 hours apart with just the watchdog notification. ![]() Im a bit lost here. OA47 |
||||
disco4now![]() Guru ![]() Joined: 18/12/2014 Location: AustraliaPosts: 936 |
I have looked at the code but have not seen anything that might cause it. I have made some changes that may help narrow it down or may even fix it if its due to a spurious MMBasic reset. (Which is the only think I can see which would clear the Program Memory and leave the firmware intact.) PC13 was implicated with the SDCard in the past so maybe something is triggered when writing your log file. There are two things in the firmware. 1. An MMBasic Reset will report itself on the console at the restart after the reset so you know it has happened. 2. An MMBasic Reset will only be triggered during a Power Restart. Once MMBasic is running it will not trigger an MMBasic Reset no matter what conditions are placed on PC13. This firmware requires a GND on PC13 to trigger the MMBasic Reset as before. 3.3V on PC13 will trigger a switch to the serial console, again only at a Power Restart. The startup banner at an MMBasic Reset. > ARMmite MMBasic Version 5.07.02b4 (PC13 Reset) Copyright 2011-2025 Geoff Graham Copyright 2016-2025 Peter Mather !!! MMBasic Reset !!! A little test program to show it can't be killed once it starts.??? Print "Program Available" WatchDog 2000 Do Pause 3000 Loop SUB mm.startup Option autorun ON End Sub The firmware ArmmiteF407PC13Reset.zip Latest F4 Latest H7 FotS |
||||
OA47 Guru ![]() Joined: 11/04/2012 Location: AustraliaPosts: 954 |
Thankyou Gerry for your efforts, I will implement the update as soon as possible. OA47 |
||||
![]() |