Sysprogs forums › Forums › VisualGDB › BSP STM32 2019.06 fails to reconnect HID-USB on PC restart
- This topic has 6 replies, 3 voices, and was last updated 4 years, 9 months ago by soldy.
-
AuthorPosts
-
December 19, 2019 at 17:31 #26903SRParticipant
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 ProfilerDecember 19, 2019 at 18:24 #26904supportKeymasterHi,
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.
January 27, 2020 at 22:47 #27274soldyParticipantHi,
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.
January 27, 2020 at 23:28 #27275supportKeymasterHi,
Please refer to the following page for the instructions on downloading the old packages: http://visualgdb.com/support/oldpackages/
January 28, 2020 at 09:05 #27276SRParticipantHi 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.January 28, 2020 at 16:42 #27277supportKeymasterHi,
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.
January 28, 2020 at 20:44 #27278soldyParticipantHi,
Thank you all for your responses, at least for now I was able to roll back BSP version 2018.12R2.
Thanks.
-
AuthorPosts
- You must be logged in to reply to this topic.