mirror of
https://github.com/hathach/tinyusb.git
synced 2025-04-16 05:42:56 +00:00
only set turnaround in reset complete
This commit is contained in:
parent
e3974d6869
commit
d2450abaaf
@ -417,16 +417,11 @@ void dcd_init (uint8_t rhport)
|
|||||||
// Disable external VBUS detection
|
// Disable external VBUS detection
|
||||||
usb_otg->GUSBCFG &= ~USB_OTG_GUSBCFG_ULPIEVBUSD;
|
usb_otg->GUSBCFG &= ~USB_OTG_GUSBCFG_ULPIEVBUSD;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Highspeed with external ULPI PHY
|
|
||||||
set_turnaround(usb_otg, TUSB_SPEED_HIGH);
|
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
// Enable internal PHY
|
// Enable internal PHY
|
||||||
usb_otg->GUSBCFG |= USB_OTG_GUSBCFG_PHYSEL;
|
usb_otg->GUSBCFG |= USB_OTG_GUSBCFG_PHYSEL;
|
||||||
|
|
||||||
set_turnaround(usb_otg, TUSB_SPEED_FULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reset core after selecting PHY
|
// Reset core after selecting PHY
|
||||||
@ -457,7 +452,7 @@ void dcd_init (uint8_t rhport)
|
|||||||
|
|
||||||
if ( rhport == 1 )
|
if ( rhport == 1 )
|
||||||
{
|
{
|
||||||
if ( !TUD_OPT_HIGH_SPEED ) dev->DCFG |= ((TUD_OPT_HIGH_SPEED ? DCD_HIGH_SPEED : DCD_FULL_SPEED_USE_HS) << USB_OTG_DCFG_DSPD_Pos);
|
dev->DCFG |= ((TUD_OPT_HIGH_SPEED ? DCD_HIGH_SPEED : DCD_FULL_SPEED_USE_HS) << USB_OTG_DCFG_DSPD_Pos);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user