Menu

#148 timeout on ERASE_PAGE with GD32VF103

none
invalid
nobody
None
2023-10-23
2022-11-06
Olivier
No

Hello,

trying to update the firmware of a GD32VF103 using dfu-util I got the following :

sudo dfu-util -v -v -d 28e9:0189 -a 0 --dfuse-address 0x08000000:leave -D .pio/build/sipeed-longan-nano/firmware.bin

dfu-util 0.11

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

libusb version 1.0.25 (11692)
dfu-util: Warning: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release
Opening DFU capable USB device...
Device ID 28e9:0189
Device DFU version 011a
DFU attributes: (0x0b) bitCanDnload bitCanUpload bitWillDetach
Detach timeout 255 ms
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...
DFU state(5) = dfuDNLOAD-IDLE, status(0) = No error condition is present
Aborting previous incomplete transfer
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 011a
Device returned transfer size 2048
DfuSe interface name: "Internal Flash  "
Memory segment at 0x08000000 128 x 1024 = 131072 (rew)
Found GD32VF103, which reports a bad page size and count for its internal memory.
Fixed layout based on part number: page size 1024, count 128.
Downloading element to address = 0x08000000, size = 6584
Erasing page size 1024 at address 0x08000000, page starting at 0x08000000
   Poll timeout 60 ms
   Poll timeout 0 ms
Erasing page size 1024 at address 0x08000400, page starting at 0x08000400
   Poll timeout 60 ms
   Poll timeout 0 ms
Erasing page size 1024 at address 0x08000800, page starting at 0x08000800
   Poll timeout 60 ms
dfu-util: Error during special command "ERASE_PAGE" get_status

For info dfu-util -l report this :
Found DFU: [28e9:0189] ver=0100, devnum=15, cfg=1, intf=0, path="3-1.4", alt=0, name="@Internal Flash /0x08000000/128*001Kg", serial="3CBJ"

I don't know what to understand from the poll timeout messages.

Thank you for your help,

Olivier

Discussion

  • Tormod Volden

    Tormod Volden - 2023-03-13
    • status: open --> needsinfo
     
  • Tormod Volden

    Tormod Volden - 2023-03-13

    Thanks for your report.

    Please try latest git master, I have added more diagnostics on this kind of failures.

     
  • Olivier

    Olivier - 2023-03-18

    Hi,
    It looks like the issue is resolved using the latest version of dfu-util provided by Fedora 38 :
    dfu-util -l :

    dfu-util 0.11
    
    Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
    Copyright 2010-2021 Tormod Volden and Stefan Schmidt
    This program is Free Software and has ABSOLUTELY NO WARRANTY
    Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
    
    Found DFU: [28e9:0189] ver=0100, devnum=8, cfg=1, intf=0, path="3-1.4", alt=0, name="@Internal Flash  /0x08000000/128*001Kg", serial="3CBJ"
    

    Trying to upload the firmware do not fail anymore :
    sudo dfu-util -v -v -d 28e9:0189 -a 0 --dfuse-address 0x08000000:leave -D .pio/build/sipeed-longan-nano/firmware.bin

    dfu-util 0.11
    
    Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
    Copyright 2010-2021 Tormod Volden and Stefan Schmidt
    This program is Free Software and has ABSOLUTELY NO WARRANTY
    Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
    
    libusb version 1.0.25 (11692)
    DFU suffix version 100
    Opening DFU capable USB device...
    Device ID 28e9:0189
    Device DFU version 011a
    DFU attributes: (0x0b) bitCanDnload bitCanUpload bitWillDetach
    Detach timeout 255 ms
    Claiming USB DFU Interface...
    Setting Alternate Interface #0 ...
    Determining device status...
    DFU state(2) = dfuIDLE, status(0) = No error condition is present
    DFU mode device DFU version 011a
    Device returned transfer size 2048
    DfuSe interface name: "Internal Flash  "
    Memory segment at 0x08000000 128 x 1024 = 131072 (rew)
    Found GD32VF103, which reports a bad page size and count for its internal memory.
    Fixed layout based on part number: page size 1024, count 128.
    Downloading element to address = 0x08000000, size = 6584
    Erasing page size 1024 at address 0x08000000, page starting at 0x08000000
       Poll timeout 60 ms
       Poll timeout 0 ms
    Erasing page size 1024 at address 0x08000400, page starting at 0x08000400
       Poll timeout 60 ms
       Poll timeout 0 ms
    Erasing page size 1024 at address 0x08000800, page starting at 0x08000800
       Poll timeout 60 ms
       Poll timeout 0 ms
    Erasing page size 1024 at address 0x08000c00, page starting at 0x08000c00
       Poll timeout 60 ms
       Poll timeout 0 ms
    Erasing page size 1024 at address 0x08001000, page starting at 0x08001000
       Poll timeout 60 ms
       Poll timeout 0 ms
    Erasing page size 1024 at address 0x08001400, page starting at 0x08001400
       Poll timeout 60 ms
       Poll timeout 0 ms
    Erasing page size 1024 at address 0x08001800, page starting at 0x08001800
       Poll timeout 60 ms
       Poll timeout 0 ms
     Download from image offset 00000000 to memory 08000000-080007ff, size 2048
      Setting address pointer to 0x08000000
       Poll timeout 80 ms
       Poll timeout 0 ms
     Download from image offset 00000800 to memory 08000800-08000fff, size 2048
      Setting address pointer to 0x08000800
       Poll timeout 80 ms
       Poll timeout 0 ms
     Download from image offset 00001000 to memory 08001000-080017ff, size 2048
      Setting address pointer to 0x08001000
       Poll timeout 80 ms
       Poll timeout 0 ms
     Download from image offset 00001800 to memory 08001800-080019b7, size 440
      Setting address pointer to 0x08001800
       Poll timeout 80 ms
       Poll timeout 0 ms
    File downloaded successfully
      Setting address pointer to 0x08000000
       Poll timeout 80 ms
       Poll timeout 0 ms
    Submitting leave request...
    

    So I think this issue can be considered solved, except if you think the Poll timeout messages indicate something to deal with.

    Thank you

     
  • Tormod Volden

    Tormod Volden - 2023-10-23
    • status: needsinfo --> invalid
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB