Skip to content

Reconnect not working properly #33

@PiPointX

Description

@PiPointX

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions