eclipse-threadx / usbx

Eclipse ThreadX - USBX is a high-performance USB host, device, and on-the-go (OTG) embedded stack, that is fully integrated with Eclipse ThreadX RTOS
https://github.com/eclipse-threadx/rtos-docs/blob/main/rtos-docs/usbx/index.md
MIT License
157 stars 92 forks source link

Callback Functions for USBX Interrupt #168

Open MauricioConceptu opened 2 months ago

MauricioConceptu commented 2 months ago

Hello, I have doubts about the operation of USBX interrupts in relation to USB Device High Speed. Taking a deeper look at the UINT (*ux_system_slave_change_function)(ULONG) parameter of the function ux_device_stack_initialize. I found that there are a number of callback functions that tie the operating system to the HAL in ux_dcd_stm32_callback.c and of these functions only HAL_PCD_SuspendCallback is called when disconnecting or connecting the HOST through the chip USB3300 microchip. In addition, the system only recognizes void OTG_HS_IRQHandler(void) and never uses the VOID _ux_dcd_stm32_interrupt_handler(VOID) function. I'm curious when this interrupt_handle function is called in the operating system or if I need to implement a function. And I'm still in doubt about how to communicate with the phy registers through the ULPI commands, I didn't find the function that makes this communication. I'm trying to understand how the Operating System identifies that the HOST is connected or disconnected.