Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reconnect not working properly #33

Open
PiPointX opened this issue Sep 19, 2023 · 0 comments
Open

Reconnect not working properly #33

PiPointX opened this issue Sep 19, 2023 · 0 comments

Comments

@PiPointX
Copy link

Describe the set-up

I'm using a H7B3 on a custom board. On this board I want to use USB with Azure USBx.
The USB configuration in CubeMX is:

USB host only
DMA enabled
internal PHY
Speed: FullSpeed

The USB devices I want to connect to my board are:

  • Prolific-Device
  • MassStorage-Device

I'm using CubeIDE 1.10.1 and X-CUBE-AZRTOS-H7 v2.1.0

Describe the bug (skip if none)
If I connect a prolific device for the first time, it gets detected correctly.
When I disconnect it and reconnect it after a few seconds, sometimes a communication is not possible any more, even it seems that it was detected.

How to reproduce the bug (skip if none)

  1. Connect a prolific device to USB interface
  2. Communicate -> working
  3. Disconnect the prolific device
  4. Wait some seconds
  5. Connect the prolific device again
  6. Communicate -> sometime not working

Additional context
I currently fixed it by reinitialize the HCD after a disconnection was detected. I placed the reinit into the USBx-EventCallback in the event UX_DEVICE_DISCONNECTION.

    HAL_HCD_Stop(&_handle);
    HAL_HCD_Init(&_handle);
    HAL_HCD_Start(&_handle);

Screenshots

If applicable, add screenshots to help explain your problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant