Using USB OTG HS with internal FS PHY on STM32F446RET6 #2867
-
Hi, I am currently working on a simple DFU bootloader on my STM32F446RET6 PCB. I have my USB port connected to the USB OTG HS pins and I plan to use the internal full speed PHY as described in datasheet. Here is my configuration: I have added to following definitions in the #define CFG_TUSB_MCU OPT_MCU_STM32F4
#define BOARD_DEVICE_RHPORT_SPEED OPT_MODE_FULL_SPEED
#define BOARD_DEVICE_RHPORT_NUM 1
#define CFG_TUSB_RHPORT1_MODE (OPT_MODE_DEVICE | OPT_MODE_FULL_SPEED)
#define BOARD_TUD_RHPORT 1 However, when I flash and run the firmware, the following assertion always fails: tinyusb/src/portable/synopsys/dwc2/dcd_dwc2.c Line 647 in 038be21 This does not happen when I am using my development board with the USB port connected to USB OTG FS. Any idea what the problem is here? Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi, what's the value of gsnpsid ? If it's 0 then maybe OTG_HS's clock is not enabled. |
Beta Was this translation helpful? Give feedback.
Hi, it seems that
gsnpsid
is 0 as you suggested. Investigating the debugger, I found out at therhport
is 0 so it turns out that runningtusb_init()
without supplying any arguments will default to RH port 0 so I have to calltusb_init(1, NULL)
instead. The issue should be fixed now. Thank you very much!