Skip to content

Commit

Permalink
[H7] STM32H750 - Fix CPU crash on cold boot when VCP is enabled. (#8221)
Browse files Browse the repository at this point in the history
[H7] STM32H750 - Fix CPU crash on cold boot when VCP is enabled.
  • Loading branch information
mikeller committed May 9, 2019
2 parents 922f927 + ad1c802 commit a4aa237
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/drivers/serial_usb_vcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,13 @@ serialPort_t *usbVcpOpen(void)

/* Start Device Process */
USBD_Start(&USBD_Device);

#ifdef STM32H7
HAL_PWREx_EnableUSBVoltageDetector();
delay(100); // Cold boot failures observed without this, even when USB cable is not connected
#endif


#else
Set_System();
Set_USBClock();
Expand Down

0 comments on commit a4aa237

Please sign in to comment.