BSP STM32 2019.06 fails to reconnect HID-USB on PC restart

Sysprogs forums Forums VisualGDB BSP STM32 2019.06 fails to reconnect HID-USB on PC restart

Tagged: , ,

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #26903
    SR
    Participant

    Hi,

    I have got the following problem:

    After Updating my STM32 BSP to Version 2019.06, our device looses USB connection when the host PC restarts and doesn’t reconnect.
    I have tried changing back to 2018.12R2 and everything works. With Version 2019.12 it is broken too.

    I have attached the old and new log file in the bottom.
    hid_fops_init and hid_fops_deinit are functions I register to USBD_CUSTOM_HID_RegisterInterface via the USBD_CUSTOM_HID_ItfTypeDef struct.
    The device seems to maintain power over USB as it does not log Startup twice.

     

    Have I done something wrong, have I missed something, or can you reproduce this error on your side?

    Cheers, SR

     

    Log with BPS 2019.06 or 2019.12:

    @000.000.000 | [Debug] Startup
    @000.385.968 | hid_fops_init()
    <Rebooting Host PC here >
    @052.698.032 | hid_fops_deinit()
    @053.684.990 | hid_fops_init()
    @079.983.426 | hid_fops_deinit()

    Log with BPS 2018.12R2:

    @000.000.000 | [Debug] Startup
    @000.385.968 | hid_fops_init()
    <Rebooting Host PC here >
    @052.698.032 | hid_fops_deinit()
    @053.684.990 | hid_fops_init()
    @079.983.426 | hid_fops_deinit()
    @080.984.990 | hid_fops_init()

    Setup:

    Board: STM32F407VG
    VisualGDB: 5.5 Preview 1
    BSP: 2019.06
    ARM ToolChain: 9.21/8.3.0/r1
    Packages:
    – STM32F4 HAL Library
    – STM32F4 Low-level Driver Library
    – STM32 USB Device Library – Custom Human Interface Device
    – Fast Semihosting and Embedded Profiler

    #26904
    support
    Keymaster

    Hi,

    Sorry, as the STM32 drivers come directly from ST and are not maintained by us, the support we can provide here is somewhat limited.

    Please try reproducing the problem with a new project created from scratch (by selecting the “STM32CubeMX Samples” in the wizard). If it persists, please consider submitting a bugreport to ST (you can find the SDK version used by each BSP in the SDKVersions.xml file).

    If the problem does not happen on a new project, most likely the new SDK has introduced new configuration parameters, or changed some APIs, and the project would need to be updated accordingly. Comparing the project code with the freshly cloned sample project should be a good starting point.

    #27274
    soldy
    Participant

    Hi,

    I have got the same problem with all my projects, now I am trying to retrieve the 2018.12R2 and I am not able to do it, we are able to go back before in VisualGDB, now it seems that the library is not available anymore. Is there any place were I can garb this library, lessons learned I will now put the required library in the project I do not want to have all these troubles anymore.

    #27275
    support
    Keymaster

    Hi,

    Please refer to the following page for the instructions on downloading the old packages: http://visualgdb.com/support/oldpackages/

    #27276
    SR
    Participant

    Hi Soldy,

    we manually rolled back our BSP version in project.vcxproj to <BSP_VERSION>2018.12R2</BSP_VERSION>.
    After restarting Visual Studio VisualGDB would go ahead and install the needed STM32 SDK.

    Our dirty bugfix in the meantime was to ckeck if the USB connection was suspended for longer than 10sec and then stop, deinit, init and start the USB connection.

     

    In regards to the ST-Micro Bug-Report: we tried posting our problem in their forum (https://community.st.com/s/question/0D50X0000BsPpLRSQ0/stm32-sdk-1240-fails-to-reconnect-hidusb-on-pc-reboot) but to no avail. We would appreciate your support over there, maybe it gets some attention.
    Seeing that we are not the only ones with this problem, we are going to contact support directly.

    #27277
    support
    Keymaster

    Hi,

    You can disable VisualGDB updates via a checkbox at the bottom of the Manage VisualGDB Packages window. Also VisualGDB 5.5 Preview 3 allows disabling updates for a specific version of the package.

    We understand that there is likely a bug in the new BSP, however we absolutely do not control the contents of the ST’s SDKs and it is absolutely not possible for us to provide free bugfixes to a major SDK maintained by a huge company, sorry. The best we could do is if you confirm that the problem exists with a freshly created VisualGDB project but does not exist when creating a similar project with the ST’s Eclipse-based IDE. If this is the case, we can help you find the difference between the 2 projects and update the VisualGDB project to replicate the other project’s results.

    #27278
    soldy
    Participant

    Hi,

    Thank you all for your responses, at least for now I was able to roll back BSP version 2018.12R2.

    Thanks.

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.