add delay before sampling VBUS_DET
This commit is contained in:
parent
866cbb11bf
commit
991a4a1dc5
@ -609,6 +609,7 @@ void app_init(void) {
|
|||||||
// check if we are plugged into USB power.
|
// check if we are plugged into USB power.
|
||||||
HAL_GPIO_VBUS_DET_in();
|
HAL_GPIO_VBUS_DET_in();
|
||||||
HAL_GPIO_VBUS_DET_pulldown();
|
HAL_GPIO_VBUS_DET_pulldown();
|
||||||
|
delay_ms(10);
|
||||||
if (HAL_GPIO_VBUS_DET_read()){
|
if (HAL_GPIO_VBUS_DET_read()){
|
||||||
/// if so, enable USB functionality.
|
/// if so, enable USB functionality.
|
||||||
_watch_enable_usb();
|
_watch_enable_usb();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user