drivers: udc_dwc2: Wait for USBHS clock start
Accessing DWC2 otg core registers before the clock starts results in complete system hang. Add a 1 us busy wait to make sure that software won't access registers before the clock is started. Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
This commit is contained in:
parent
065bd32220
commit
df36b162bd
1 changed files with 3 additions and 0 deletions
|
@ -201,6 +201,9 @@ static inline int usbhs_enable_core(const struct device *dev)
|
|||
wrapper->ENABLE = USBHS_ENABLE_PHY_Msk | USBHS_ENABLE_CORE_Msk;
|
||||
wrapper->TASKS_START = 1UL;
|
||||
|
||||
/* Wait for clock to start to avoid hang on too early register read */
|
||||
k_busy_wait(1);
|
||||
|
||||
/* Enable interrupts */
|
||||
wrapper->INTENSET = 1UL;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue