arch/nrf53: port d7aea88727 change from nrf52

Changed NRF53 USB initialization to check for power via USBREGSTATUS instead of waiting for interrupt
This commit is contained in:
raiden00pl 2023-08-13 08:52:51 +02:00 committed by Alan Carvalho de Assis
parent fc4ddfb1f4
commit 3a61db4c7b
1 changed files with 2 additions and 3 deletions

View File

@ -3052,9 +3052,8 @@ static void nrf53_hwinitialize(struct nrf53_usbdev_s *priv)
{
/* Wait for VBUS */
/* TODO: connect to POWER USB events */
while (getreg32(NRF53_USBREG_EVENTS_USBDETECTED) == 0);
while ((getreg32(NRF53_USBREG_USBREGSTATUS) &
USBREG_USBREGSTATUS_VBUSDETECT) == 0);
/* Enable the USB controller */