Skip to main content
Marius CO
Associate II
January 11, 2018
Solved

NUCLEO F411RE USB

  • January 11, 2018
  • 2 replies
  • 751 views
Posted on January 11, 2018 at 02:31

Hello.

NUCLEO F411RE, Workbench generated project, Ubuntu 64 16.04, STCUbeMX , I think is  V1.18

I wired a USB cable to USB-DP (PA12)  USB-DM (PA11) GND and 5V.

I have a usb initialised as simple as instructed.

void MX_USB_DEVICE_Init(void)

    {

    USBD_Init(&hUsbDeviceFS, &FS_Desc, DEVICE_FS);

    USBD_RegisterClass(&hUsbDeviceFS, &USBD_CDC);

    USBD_CDC_RegisterInterface(&hUsbDeviceFS, &USBD_Interface_fops_FS);

    USBD_Start(&hUsbDeviceFS);

    }

When I plug in the USB I cannot see the device. I could not find a solution.

[ 1020.672169] usb 2-2: new full-speed USB device number 19 using xhci_hcd

[ 1020.784169] usb 2-2: device descriptor read/64, error -71

[ 1021.000167] usb 2-2: device descriptor read/64, error -71

[ 1021.216158] usb 2-2: new full-speed USB device number 20 using xhci_hcd

[ 1021.216312] usb 2-2: Device not responding to setup address.

[ 1021.420263] usb 2-2: Device not responding to setup address.

[ 1021.624148] usb 2-2: device not accepting address 20, error -71

[ 1021.736140] usb 2-2: new full-speed USB device number 21 using xhci_hcd

[ 1021.736282] usb 2-2: Device not responding to setup address.

[ 1021.940249] usb 2-2: Device not responding to setup address.

[ 1022.144092] usb 2-2: device not accepting address 21, error -71

[ 1022.144128] usb usb2-port2: unable to enumerate USB device
    This topic has been closed for replies.
    Best answer by Marius CO
    Posted on January 12, 2018 at 03:40

    Hi, Thank you. I figure it out meanwhile with help from a HW engineer.

    The Nucleos F411re I have has the 8Mhz crystal on the Sllink side. 

    On Nucleo side,
    • I removed the SB16MCO 0 ohm resistor on the back close to crystal holes.
    • I soldered a 25 Mhz crystal and the 2 caps C33 and C44  ~15pf where crystal was missing,
    • I changed the clock in hal*.h from 8Mhz to 25Mhz

     sudo dmesg -c

    [46594.984255] usb 2-2: new full-speed USB device number 20 using xhci_hcd

    [46595.114171] usb 2-2: New USB device found, idVendor=0483, idProduct=5740

    [46595.114175] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3

    [46595.114176] usb 2-2: Product: STM32 Virtual ComPort

    [46595.114178] usb 2-2: Manufacturer: STMicroelectronics

    [46595.114179] usb 2-2: SerialNumber: 00000000001A

    [46595.114784] cdc_acm 2-2:1.0: ttyACM1: USB ACM devic

    2 replies

    Technical Moderator
    January 11, 2018
    Posted on January 11, 2018 at 15:49

    Hello

    marrius9876

    ,

    Check if your VCP driver is correctly installed on PC, and try to increase heap and stack sizes.

    May be this is due to VBUS sensing it must be set do Disable.

    Note: Please use the last version of STM32CubeMx (v4.23)

    Kind Regards,

    Imen

    In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
    Marius CO
    Marius COAuthorBest answer
    Associate II
    January 12, 2018
    Posted on January 12, 2018 at 03:40

    Hi, Thank you. I figure it out meanwhile with help from a HW engineer.

    The Nucleos F411re I have has the 8Mhz crystal on the Sllink side. 

    On Nucleo side,
    • I removed the SB16MCO 0 ohm resistor on the back close to crystal holes.
    • I soldered a 25 Mhz crystal and the 2 caps C33 and C44  ~15pf where crystal was missing,
    • I changed the clock in hal*.h from 8Mhz to 25Mhz

     sudo dmesg -c

    [46594.984255] usb 2-2: new full-speed USB device number 20 using xhci_hcd

    [46595.114171] usb 2-2: New USB device found, idVendor=0483, idProduct=5740

    [46595.114175] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3

    [46595.114176] usb 2-2: Product: STM32 Virtual ComPort

    [46595.114178] usb 2-2: Manufacturer: STMicroelectronics

    [46595.114179] usb 2-2: SerialNumber: 00000000001A

    [46595.114784] cdc_acm 2-2:1.0: ttyACM1: USB ACM devic