2020-04-23 07:09 AM
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?
2020-04-23 07:42 AM
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:
2020-04-23 08:01 AM
> 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.
2020-04-23 08:04 AM
No, that's working perfectly fine at 200 MHz system clock. The system is about 40% idle at max IR load.