diff --git a/ports/stm32/boards/STM32F769DISC/mpconfigboard.h b/ports/stm32/boards/STM32F769DISC/mpconfigboard.h index 68e14761ec..8dbac2d015 100644 --- a/ports/stm32/boards/STM32F769DISC/mpconfigboard.h +++ b/ports/stm32/boards/STM32F769DISC/mpconfigboard.h @@ -102,6 +102,8 @@ extern struct _spi_bdev_t spi_bdev; // USB config (CN15 - USB OTG HS with external PHY) #define MICROPY_HW_USB_HS (1) +#define MICROPY_HW_USB_HS_ULPI_NXT (pin_H4) +#define MICROPY_HW_USB_HS_ULPI_DIR (pin_I11) // Ethernet via RMII #define MICROPY_HW_ETH_MDC (pin_C1) diff --git a/ports/stm32/usbd_conf.c b/ports/stm32/usbd_conf.c index d30f28b2fc..c2edbb7187 100644 --- a/ports/stm32/usbd_conf.c +++ b/ports/stm32/usbd_conf.c @@ -171,7 +171,7 @@ void HAL_PCD_MspInit(PCD_HandleTypeDef *hpcd) { // Configure USB HS GPIOs static const mp_hal_pin_obj_t usb_pins[] = { - pin_A5, pin_C0, pin_H4, pin_I11, // CLK, STP, NXT, DIR + pin_A5, pin_C0, MICROPY_HW_USB_HS_ULPI_NXT, MICROPY_HW_USB_HS_ULPI_DIR, // CLK, STP, NXT, DIR pin_A3, pin_B0, pin_B1, pin_B5, pin_B10, pin_B11, pin_B12, pin_B13, // D0-D7 }; for (size_t i = 0; i < MP_ARRAY_SIZE(usb_pins); ++i) {