cancel
Showing results for 
Search instead for 
Did you mean: 

STM USB Library Bug? Gets stuck in interrupt

ashley23
Associate II
Posted on September 24, 2010 at 01:00

STM USB Library Bug? Gets stuck in interrupt

4 REPLIES 4
Posted on May 17, 2011 at 14:08

I'd guess you could check for and clear/disable the interrupt as it is about to leave the ISR.

Or ascertain why it is getting set or why it is not being cleared by the ISR. If the ISR does not address the condition (due to code flow issues, or whatever), you'll just get an interrupt crap storm and nothing else will run.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
ashley23
Associate II
Posted on May 17, 2011 at 14:08

I still cant put my finger on the cause of this.  It has something to do with writing to a IN endpoint when the PC doesn't read from it.  It definitely gets stuck in an ''interrupt crap storm''.  I really don't have time to try find the cause of it now but I think I am going to have to as it is starting to plague me a little!

I'll be honest, I am a little over fumbling my way through this USB stack.  There is no documentation and limited examples and now problems that cause it to get stuck!!!  But, I suppose it would have taken me forever to even get this far on my own!!!

xacc
Associate II
Posted on May 17, 2011 at 14:08

Hi

Are you using the Virtual COM driver?

If so, I had a similar issue, but created a work around.

The problem is that the 'output' buffer gets 'full' and effectively locks up the chip due to the ISR being fired continuously.

The workaround (in my case specifically using usb stdio via vcom) involves polling for information to see if there is anything in the transmit buffer. If the polling fails after x attempts (1000 in my case), the call to transmit is silently ignored. 

I will post some code later explaining this better :)

ababo
Associate II
Posted on January 06, 2014 at 13:41

Hi leppie,

I am having the same problem!

Could you share your solution?

Thanks :)