AnsweredAssumed Answered

Bootloader USB settings

Question asked by Mathilde on Apr 13, 2015
Latest reply on Nov 9, 2015 by taelman.johannes
Hi,

I want to make a firmware update on a STM32F437 via USB. I enter the bootloader mode by jumping to it directly from my application. This part works correctly, and I can see the device "STMicroelectonics STM Device in DFU mode" when I launch lsusb.

However, there is a missing information on the USB interface descriptor (iInterface for the internal flash part):

Bus 002 Device 008: ID 0483:df11 STMicroelectronics STM Device in DFU Mode
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x0483 STMicroelectronics
  idProduct          0xdf11 STM Device in DFU Mode
  bcdDevice           22.00
  iManufacturer           1 STMicroelectronics
  iProduct                2 STM32  BOOTLOADER
  iSerial                 3 3551365B3033
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           54
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xc0
      Self Powered
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass       254 Application Specific Interface
      bInterfaceSubClass      1 Device Firmware Update
      bInterfaceProtocol      2
      iInterface              4 Missing information!
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       1
      bNumEndpoints           0
      bInterfaceClass       254 Application Specific Interface
      bInterfaceSubClass      1 Device Firmware Update
      bInterfaceProtocol      2
      iInterface              5 @Option Bytes  /0x1FFFC000/01*016 e/0x1FFEC000/01*016 e
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       2
      bNumEndpoints           0
      bInterfaceClass       254 Application Specific Interface
      bInterfaceSubClass      1 Device Firmware Update
      bInterfaceProtocol      2
      iInterface              6 @OTP Memory /0x1FFF7800/01*512 e,01*016 e
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       3
      bNumEndpoints           0
      bInterfaceClass       254 Application Specific Interface
      bInterfaceSubClass      1 Device Firmware Update
      bInterfaceProtocol      2
      iInterface              7 @Device Feature/0xFFFF0000/01*004 e
      Device Firmware Upgrade Interface Descriptor:
        bLength                             9
        bDescriptorType                    33
        bmAttributes                       11
          Will Detach
          Manifestation Intolerant
          Upload Supported
          Download Supported
        wDetachTimeout                    255 milliseconds
        wTransferSize                    2048 bytes
        bcdDFUVersion                   1.1a
Device Status:     0x0001
  Self Powered

If I launch dfu-util I get the following result with the same missing information (name = "UNKWNOWN"):

dfu-util 0.8

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2014 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org

Found DFU: [0483:df11] ver=2200, devnum=8, cfg=1, intf=0, alt=3, name="@Device Feature/0xFFFF0000/01*004 e", serial="3551365B3033"
Found DFU: [0483:df11] ver=2200, devnum=8, cfg=1, intf=0, alt=2, name="@OTP Memory /0x1FFF7800/01*512 e,01*016 e", serial="3551365B3033"
Found DFU: [0483:df11] ver=2200, devnum=8, cfg=1, intf=0, alt=1, name="@Option Bytes  /0x1FFFC000/01*016 e/0x1FFEC000/01*016 e", serial="3551365B3033"
Found DFU: [0483:df11] ver=2200, devnum=8, cfg=1, intf=0, alt=0, name="UNKNOWN", serial="3551365B3033"

If I try to upload a firmware to the device then dfu-util give the error "could not read name, sscanf returned 0".

If I do the same tests with a STM32F4 discovery board, the interface name is not missing and I can do the firmware upgrade.

It seems to me that the missing information is critical to my firmware upgrade so is there a way to restore it or can I do the upgrade without it?

Outcomes