AnsweredAssumed Answered

STM32F429ZIT  with dfu-util (Flash configuration not readable)

Question asked by Hartmut Reinke on May 30, 2018

I want to program an STM32F429ZIT by DFU Bootloader from an embedded Linux System(ARM)

 

I can put it into DFU mode and can see the USB interface:
--------------------------
root@technexion:~/hartmut# lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 005: ID 0483:df11 STMicroelectronics STM Device in DFU Mode
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@technexion:~/hartmut#
--------------------------

 

when i start dfu-util, i get the following error:
--------------------------
root@technexion:~/hartmut# dfu-util -l
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=5, cfg=1, intf=0, alt=3, name="@Device Feature/0xFFFF0000/01*004 e", serial="375A38643337"
Found DFU: [0483:df11] ver=2200, devnum=5, cfg=1, intf=0, alt=2, name="@OTP Memory /0x1FFF7800/01*512 e,01*016 e", serial="375A38643337"
Found DFU: [0483:df11] ver=2200, devnum=5, cfg=1, intf=0, alt=1, name="@Option Bytes  /0x1FFFC000/01*016 e/0x1FFEC000/01*016 e", serial="375A38643337"
Found DFU: [0483:df11] ver=2200, devnum=5, cfg=1, intf=0, alt=0, name="UNKNOWN", serial="375A38643337"
root@technexion:~/hartmut#
--------------------------

 

When i investigyte further by lsusb i get the following result (sinppet):
--------------------------
    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 (error)
    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
--------------------------
the Interface with bAlternateSetting=0 seems not be recognized correctly by lsusb.
(problem of Linux?)

 

I did the same procedure with a discovery board (STM32F429ZGT6U) without problems.
It showed this interface as "@Internal Flash /0x08000000/04*016Kg,01*064Kg,07*128Kg,04*016Kg,01*064Kg,07*128Kg"

 

So i connected the STM to a Windows PC an ran a USB sniffer (USBLyzer)
I was not able to view all the transferred Data, also i do not really understand what's going on on a usb interface.
But USBLyzer recognized the DFU-Device, showing the Interface descriptor like
  8 iInterface 1 04h "@Internal Flash /0x08000000/04*016Kg,01*064Kg,07*128Kg..........................."
I compared to the Discovery board and found it:
  8 iInterface 1 04h "@Internal Flash /0x08000000/04*016Kg,01*064Kg,07*128Kg,04*016Kg,01*064Kg,07*128Kg"

 

So the data seem to be correct (1 Mbyte Flash), but it looks like the  STM32F429ZIT6 delivers a String with some additional characters which USBLyzer (or the USB-driver on Windows) gracefully replaces with dots. Linux  seems to be less graceful.
Maybe a mismatch of length information and actual string length?.

 

So my question is:

  • Can anybody confirm this behavior of the STM32F429ZIT6 ?
  • are there other devices concerned?
  •  Is there any documentation which would allow me to select a chip whitch does not have this Problem?    (Flash size is not very important at the moment)
  • is there any workaround without recompiling the Linux kernel (i assume, dfu-utils are using the linux usb driver which    complains about the malformed string).
  • I did not find out, if there is any difference between the two STMs except the Flash size. What does the suffix "U" mean?
  • can the DFU-Bootloader within the STM32 be updated? (in case its a problem of the bootloader)

 

Any hints would be apreciated.

Thanks

Hartmut

 

Update:

I replaced the STM32F429ZIT6 by the STM32F429ZGT6 which has 2MB of flash.

Result is exactly the same.

"@Internal Flash /0x08000000/04*016Kg,01*064Kg,07*128Kg..........................."

where it should say the same as the Discovery-Board:

"@Internal Flash /0x08000000/04*016Kg,01*064Kg,07*128Kg,04*016Kg,01*064Kg,07*128Kg"

 

I also found another discussion which seems to point to the same problem, altough it is an STM32F427 .

https://sourceforge.net/p/dfu-util/tickets/22/

Outcomes