Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 21:07 28 Mar 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 : Help needed to track down a fault.

Author Message
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 875
Posted: 05:23am 27 Nov 2022
Copy link to clipboard 
Print this post

I have an ARMITE F4 board and screen that I am using to monitor some control lines and send and receive data to a star network of micromites via 433Mhz radio modules and a PC via a serial port/usb. The issue I have is that the F4 locks up at an interval that could be up to 10 days. The PC software keeps running as do all of the remote units. The screen on the F4 just freezes as does a console connection running at 9600 bps. I have a watchdog timer set in the software so the freezing is not enabling the watchdog to reset the software. Over the past months I have swapped out all the hardware including the F4, PC, USB-Serial modules and remote units. I have run the F4 from a power pack USB output as it is usually powered by the PC so I can use the Console port to monitor the software.

I am now out of ammunition can anyone suggest a way of diagnosing this situation?

OA47
 
Quazee137

Guru

Joined: 07/08/2016
Location: United States
Posts: 514
Posted: 06:42am 27 Nov 2022
Copy link to clipboard 
Print this post

try a 2nd com port connected to a micromite. Send status of software at breaks points
in code. If the main status stops it can act as an external watchdog and reset the F4.
Log status to pc it may help locate where things break.

I use a mup micromite to debug new work. It has helped locate bugs (my errors) LOL.
Edited 2022-11-27 16:45 by Quazee137
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 875
Posted: 06:53am 27 Nov 2022
Copy link to clipboard 
Print this post

Thanks for the reply Quazee137 but I currently get debug reports to the console port which also locks up when the F4 locks up and does not describe any abnormality.
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 839
Posted: 07:07am 27 Nov 2022
Copy link to clipboard 
Print this post

You could define an number of gui LEDs on the LCD Display. Initially set them all green and assign each one to monitor key parts of the program. At start of code of interest set it red, at completion set it green. e.g when COM port gets an interrupt set LED RED, when message is complete set Green. This may help located where in code the lockup occurs. e.g if same LED is Red each time it stops.
Latest F4 Latest H7
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 1720
Posted: 07:23am 27 Nov 2022
Copy link to clipboard 
Print this post

Adding to that an SD card log might be useful. At a set of numbered points at key places in the program log the point number, time and the value of relevant variables.

That should at least indicate the last place in the program it was working, with the value of the variables showing what was going on at the time.
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 5642
Posted: 07:45am 27 Nov 2022
Copy link to clipboard 
Print this post

Is there a watchdog running? Perhaps there should be, at least for testing purposes.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8516
Posted: 08:11am 27 Nov 2022
Copy link to clipboard 
Print this post

As per Quazee137, use a second serial port with an external USB/UART rather than the console to monitor. The USB console is potentially the problem so eliminate it
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 3421
Posted: 08:12am 27 Nov 2022
Copy link to clipboard 
Print this post

Ask Peter the memory addresses of c-stack and heap. Watch those 2 during operation. These variables show how much memory is consumed. These values constantly var, but you could have a memory leak, so they fill up.

It could be in the basic code, but could also be you are using a basic command incorrectly, or the command itself has a fault.

Not sure how many peop le run an F4 continuous with complex programs. Mine is a tetris game, that I play for 1 hour, then put it away...
Edited 2022-11-27 18:14 by Volhout
PicomiteVGA PETSCII ROBOTS
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2282
Posted: 09:04am 27 Nov 2022
Copy link to clipboard 
Print this post

is the USB connection provided by the F4 processor itself, or is there an external USB to serial bridge? i'm just wondering (if the F4 is handling the USB) if the USB stack on the F4 is crashing. and could the USB stack be disabling the watchdog hardware?


cheers,
rob   :-)
Edited 2022-11-27 19:08 by robert.rozee
 
Chopperp

Guru

Joined: 03/01/2018
Location: Australia
Posts: 1028
Posted: 12:22pm 27 Nov 2022
Copy link to clipboard 
Print this post

FWIIW, I've just had a similar problem with an F4 left running connected to a PC via USB while doing software mods & tests. It was locking up periodically.

OK when back on it's normal 5V plug-pack. I didn't have the time (or inclination) to find out why.

(I was sort of blaming MMEdit but that is probably a tad unfair...)

Brian
ChopperP
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 875
Posted: 07:49pm 27 Nov 2022
Copy link to clipboard 
Print this post

Thankyou for the suggestions. I do have a feeling about the stack for the console port causing the issue so it wont be too onerous to disable data feed to the console and see how that goes over the next couple of weeks.

OA47
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8516
Posted: 07:55pm 27 Nov 2022
Copy link to clipboard 
Print this post

Use OPTION SERIAL CONSOLE ON and then connect a USB/UART to PA11/PA12. That disables the USB but allows you to keep using the console via a normal serial port
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 875
Posted: 09:55am 28 Nov 2022
Copy link to clipboard 
Print this post

I was unable to make a console connection using PA11/PA12 after using OPTION SERIAL CONSOLE ON but did notice activity on COM1 which is used to communicate with the radio module. I turned off the monitoring to the USB com port to reduce the traffic and will see how it goes.

If I cannot overcome this issue I might consider using a 44 pin micromite/lcd and port the software over.

OA47
 
disco4now

Guru

Joined: 18/12/2014
Location: Australia
Posts: 839
Posted: 10:14am 28 Nov 2022
Copy link to clipboard 
Print this post

  OA47 said  after using OPTION SERIAL CONSOLE ON ... did notice activity on COM1 ...
OA47

Yes, OPTION SERIAL CONSOLE ON does place the console on COM1, PA09 and PA10.
PA11/12 are the USB console data connections.
Latest F4 Latest H7
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 875
Posted: 07:02am 06 Dec 2022
Copy link to clipboard 
Print this post

I have monitored the software running on the F4 Armite for a week, after restricting regular feeds to the USB/console and moving it to an always powered USB port, the software has not locked up but I did have to reboot the PC to get the USB port to talk to the Armite. I have programmed an uptime counter to display on the TFT and will monitor further.

OA47
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 875
Posted: 04:55am 28 Dec 2022
Copy link to clipboard 
Print this post

500 hours on the uptime monitor, so my current conclusion is that the console buffer or stack has possibly caused the unit to freeze.

Maybe see if it makes another 500 hours.

OA47
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 875
Posted: 04:42am 01 Mar 2023
Copy link to clipboard 
Print this post

The unit did not make another 500 hours   At 408 hours uptime the F4 screen is frozen and there are only the initial startup messages on the CONSOLE and no error messages. I have an EVENT.LOG file that saves a log of events to the SD card but there is no indication of abnormalities in the software the last entry is timed before the clock on the frozen screen. I am using the lab power supply to supply the F4 board.

Any suggestions?

OA47
 
Print this page


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

© JAQ Software 2024