Skip to main content
Visitor II
April 2, 2021
Solved

NUCLEO F413 User USB Connection

  • April 2, 2021
  • 6 replies
  • 1819 views

Hello!

I am connecting my nucleo to my computer through the user usb. I have set FDMOD and received the USBRST message and initialized the endpoint, but after i receive ENUMDNE I never receive the RXFLVL interrupt.

Here is the output of dmesg on my computer:

[ 6544.461644] usb 1-10: new full-speed USB device number 56 using xhci_hcd
[ 6544.589741] usb 1-10: device descriptor read/64, error -71
[ 6544.829707] usb 1-10: device descriptor read/64, error -71
[ 6545.065646] usb 1-10: new full-speed USB device number 57 using xhci_hcd
[ 6545.197659] usb 1-10: device descriptor read/64, error -71
[ 6545.433727] usb 1-10: device descriptor read/64, error -71
[ 6545.541712] usb usb1-port10: attempt power cycle
[ 6546.197666] usb 1-10: new full-speed USB device number 58 using xhci_hcd
[ 6546.197770] usb 1-10: Device not responding to setup address.
[ 6546.405772] usb 1-10: Device not responding to setup address.
[ 6546.613665] usb 1-10: device not accepting address 58, error -71
[ 6546.741727] usb 1-10: new full-speed USB device number 59 using xhci_hcd
[ 6546.741834] usb 1-10: Device not responding to setup address.
[ 6546.949770] usb 1-10: Device not responding to setup address.
[ 6547.157675] usb 1-10: device not accepting address 59, error -71
[ 6547.157753] usb usb1-port10: unable to enumerate USB device

    This topic has been closed for replies.
    Best answer by waclawek.jan

    To exclude hardware problems: can the DFU bootloader enumerate?

    The Synopsys OTG is very picky. Check clocks and FIFO settings (don't forget they are in words). Post relevant portions of code.

    JW

    6 replies

    Super User
    April 2, 2021

    To exclude hardware problems: can the DFU bootloader enumerate?

    The Synopsys OTG is very picky. Check clocks and FIFO settings (don't forget they are in words). Post relevant portions of code.

    JW

    jkasperAuthor
    Visitor II
    April 6, 2021

    Hi JW,

    Yes, the dfu enumerates.

    It looks like the 413 requires an HSE clock to use usb otg so i'm installing an external crystal. But then how does the dfu work?

    Super User
    April 6, 2021

    STLink outputs an 8MHz clock, the target mcu can use it in HSE Bypass mode, if the appropriate jumpers/solder bridges are set. See the Nucleo's manual.

    JW

    jkasperAuthor
    Visitor II
    April 6, 2021

    I'm just wondering how the dfu works without an hse. The stlink mco shouldn't be connected because the solder bridges aren't set as specified in the manual. If the dfu works, do i actually need an hse?

    jkasperAuthor
    Visitor II
    April 6, 2021

    Turns out my pllq config was off, didn't need to enable mco or add crystal!

    Super User
    April 6, 2021

    The HSI may be good enough for a reasonably working USB device - at this temperature, in this piece of silicon, with this configuration of other on-chip and on-board resources - but that does not mean it's OK.

    JW

    jkasperAuthor
    Visitor II
    April 6, 2021

    Yes i'll definitely add an x3 crystal, i just wanted to know if it was mandatory to enable hse to get an otg connection

    Thanks for your help!