AnsweredAssumed Answered

USB communication stalls after some minutes of PC restart

Question asked by Hamid.Raiyan on May 9, 2017
Latest reply on May 10, 2017 by Hamid.Raiyan

Hello fellow developers,

 

I have an stm32f4 board connected to PC through a USB link. Basically, the board is linked through an SPI link to several sensors. It gathers data from the sensors, filters and processes it before it sends it to the PC through the USB link for further processing and to display the results. I am building the USB link on top of the ST cube USB library and all works well.

I have lately been adding further data to the processing algorithm. I am using an array of 8 elements to average the sensors data. I have two sensors connected that I need to do this to. When I add the averaging algorithm to one sensor, everything works great and no problems occur what so  ever. When I add the averaging to the second sensor I start to get a weird error. Basically, When I restart the PC, things work for some minutes before the USB communication stalls. To make the system run again I have to unplug and plug the USB cable. At this point, everything will work perfectly until I restart the PC again. The USB will then stall after some minutes and the cycle will continue.

 

I have used a USB analyser to understand the Problem furhter. I turned out that the board reports to the PC a USB error with reference 0xC0000011. The PC then reports to the board to abort the packet, clear and restart the session. The board sucessfully does this and just as things go back to normal, the board reports to the PC again the same error and the cycle continues.

 

has anybody have a clue what might be causing this strange error.

 

Warm Regards

Attachments

Outcomes