cancel
Showing results for 
Search instead for 
Did you mean: 

Does USB library work under heavy interrupt load?

Lars Beiderbecke
Senior III

I'm implementing a USB Host (HID Class) on a STM32F7 in order to connect a mouse.

The problem is that in about 50% of cases, phost->gState ends up in HOST_ABORT_STATE, where exactly I do not know. If this does not happen, my user function USBH_HID_EventCallback() is never called more than once.

What is special about my setting is that I have external interrupts enabled, which trigger about every half microsecond when under load. The STM32 keeps up with that, but I wonder if those interrupts might interfere with the USB library, especially the low-level parts dealing with signals.

Does anybody have any insights on how the USB library deals with interrupts? Will it disable interrupts for critical sections? Is there a recommendation how often USBH_Process() should be called?

3 REPLIES 3
Lars Beiderbecke
Senior III

I've just tested with external interrupts disabled, but I still get HOST_ABORT_STATE. So at least in this case, interrupts are not the cause.

I guess I'll withdraw my question. :smiling_face_with_smiling_eyes:

TDK
Guru

> I have external interrupts enabled, which trigger about every half microsecond when under load.

Interrupts at 2MHz are likely to cause all sorts of problems, if the chip can even keep up.

If you feel a post has answered your question, please click "Accept as Solution".

No, that's working perfectly fine at 200 MHz system clock. The system is about 40% idle at max IR load.