2018-05-24 05:23 PM
Hi,
I am using the STM32_USB-Host-Device_Lib_V2.2.0 and more specifically the STM32_USB_OTG_Driver and STM32_USB_Device_Library.
I have made running the VCP connection with an STMF405 with no problem.
Now using an STMF411, the connection does not establish : The Usb packet 'device connected' on the other end does not contains the VID nor the PID.
Tracing the interruptions in the usb_dcd_int.c, I noticed that the process does not follow the same sequence:
- With the F405 the sequence is usbreset .. enumdone .. rxstsqlvl .. outepintr where the description is sent. (in the middle of each interruption, there is several sofintr that I omit here).
- With the F411 and the same code, the sequence loops as [usbreset .. enumdone ..] 4 times and ends with a usbsuspend. (without any sofintr in between)I have checked the frequency on the line with the oscilloscope, it is okI have compared the values of each variable/register between the F405 and F411 during the usbreset and enumdone, I have exactly the same values.I do not know the protocol but what I see is that interruptions that should raise after usbreset and enumdone does not. So the USBD_VID and USBD_PID are never sent.
Does someone have an idea of where I am wrong and/or what to check or trace?
Regards,
Ludovic
#stm32f405-stm32f411-stm32_usb_otg_driver-stm32_usb_devi2018-05-25 06:39 AM
Correction:
- With the F411 and the same code, the sequence loops as [usbreset .. enumdone ..
sofintr ... sofintr...
] 4 times and ends with a usbsuspend.2018-05-26 04:47 PM
Hi,
Problem solved.
The PLL configuration given with the library was wrong on PLL_N. The PLL_x values were not ok to give the needed 48KHz clock.
Always check in detail the PLL and dividers first