I have a GHI Electronics G80 that is acting up. My code will barely deploy and when it is does deploy successfully, it doesn’t always run properly. After several deployments the code will start behaving. I have tried to reflash the FW using FEZ Config but it always fails, even when holding LDR0 / LDR1 low and resetting the device. I can see G80 connected in FEZ as well as device manager (shows up as G80 under USB devices and not under Ports). Any suggestions?
Do you write to flash at runtime? Otherwise, what is happening should be impossible
No I do not write to flash at all. It is definitely happening…
What type of development app do you have running? Is it a complex one, or a simpler one? I would first look to see if you have such a tight loop that debugging isn’t able to get timesliced in to allow deployment tasks to run.
A couple of tests you can do is to add an appropriate “gate” at the start of your application that waits for a period of time or a button press on the hardware before running the core of your app, basically something that allows you to reset the device and know that you should then be able to do deployment activities without your app getting in the way. You could also just use a simple application rather than a complex one to prove that the hardware and your PC software setup are working fine - if you can’t repro this with a simple app loaded, then clearly it’s your apps behaviours.
It always fails to reflash?
I have been fully erasing the application before deployment just in case that was causing the issues. This did not improve things but it seems selecting emulator then G80 in visual studio helps deployment. It is a fairly complex program. I have 20 ms delays between register reads during the more intensive loops…this may be too short as it seems to run debug builds fine but release builds result in incorrect register values. Increasing to 50 ms delays is running release builds correctly so far.
Still can’t explain why I am still unable to re-flash the firmware using FEZ Config…it fails every time even though I can see G80_connected in the corner.
if you aren’t doing thread.sleep’s regularly in your code, that will explain it. The app is running, so the debugging engine can’t do what it needs.
Put a simple blinky LED app on and check again. It’s an easy way to prove it is or isn’t because of your code
I erased the application and FEZ still can’t update
thanks for that detailed description of the process and the behaviours.