Changed NRF52 USB initialization to check for power via USBREGSTATUS instead of waiting for interrupt, in case we've been launched from a bootloader.
This commit is contained in:
parent
cc99d94cfd
commit
d7aea88727
@ -3052,9 +3052,8 @@ static void nrf52_hwinitialize(struct nrf52_usbdev_s *priv)
|
||||
{
|
||||
/* Wait for VBUS */
|
||||
|
||||
/* TODO: connect to POWER USB events */
|
||||
|
||||
while (getreg32(NRF52_POWER_EVENTS_USBDETECTED) == 0);
|
||||
while ((getreg32(NRF52_POWER_USBREGSTATUS) &
|
||||
NRF52_POWER_USBREGSTATUS_VBUSDETECT) == 0) ;
|
||||
|
||||
/* Errata [187] USBD: USB cannot be enabled */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user