FezDuino (SC20100) regular failure in debug mode

Hi,

We have developp a commercial solution on a FezDuino board with Wifi HTTP server and FTP server.

Unfortunately we waste a lot of time debugging the program with VS2022 for several reasons :

1- The erase/write sectors step fails regularly. What could this be due to ?

2- When the program encounters an unhandled exception in debug mode, it stops (which is normal). However it is impossible to restart the program in debug mode. You need to clear the memory and reflash the GHI firmware before…

We worked for several years and still today with the G400 boards and we did not have these kinds of problems…

Are these known problems or am I the only one having these difficulties ?

What exactly it is, please?

What do you mean “restart the program in debug mode”?

Your program get stuck somehome, there is APP button (or pin), hold it to low and it reset that allows you to program application again/

Failed to erase

During testing the deployments are not always successful…

Deployment not succesful

I tried different USB cables with the same results…

Run with VS2022 as illustrated below :
Debug mode

Ok many thanks !
I didn’t understand the usefulness of this button…
There was no need for that before with the G400.

No, you don’t need it. This is just for the case application gets stuck. G400 does not support this feature.

Can you make simple project and deploy?

What firmware are you using? What TinyCLR (extension) version are you using? what VS are you using?

When I deploy simple project it goes well.

It seems that more project is big, more sectors are need to erase/write and more likely it is that the deployment will fail… It is not always but sometimes without apparent reasons.

I use all the last updates :

I noticed that when I push the APP button to deploy my program this is going much better.
Otherwise the deployment sometimes failed although the program is not stuck.

I have seen the APP pin could be disabled with TinyCLR Config.
In what case would it be recommended to do so?
Can we do this using software ?

The APP button just prevent your application runs. It mean when your application run, somehow it cause the issue. We need to know what your application is, or you can make simple project to reproduce the issue.

And, we need to know the detail about “sometime”, how often it is, 10%, 50%, 90%…

You should try reading your CPU usage and make sure it is not 100% continuously.

Debug.WriteLine($"{(int) DeviceInformation.GetCpuUsageStatistic()}%");

also, try to change your cable or if you are using hub then try connect to PC directly to see if any different.

Hi,

Thanks for your answer.

It’s difficult to precise my application… I have a main thread with a loop that reads data from a serial port and send datas to a CAN port. Three others threads HttpListener, WebServer and FtpListener are launched in parallel. Size of my simple application is 445ko.

If I don’t press the APP button when I reload a new application with VS2022, the deployment fails about one out of ten times. It’s difficult to tell you the frequency of failure but I notice that it doesn’t happen to me with the G400s.

I try several USB cable and I didn’t see any change. FezDuino is connected directly to PC.
If I have more details to give you during my development I will not hesitate.

When I read the CPU usage in my main loop it is about 15-20% which leaves a little margin…

I recently resumed my development on FezDuino. I found a new USB cable with which everything goes much better.
But I don’t understand the difference with all the other cables I’ve tried…

1 Like

It is a power issue. It would be even better with a powered USB hub or a dedicated power supply