riscv-mcu / gd32-dfu-utils

Dfu-utils GD32 fork.
GNU General Public License v2.0
42 stars 11 forks source link

GD32VF103 variant not supported #5

Open elfmimi opened 4 years ago

elfmimi commented 4 years ago

It seems there are some variants of GD32VF103CBT6.

dfu-util --list output of bare chip available in the market.

Found DFU: [28e9:0189] ver=0100, devnum=15, cfg=1, intf=0, path="1-4", alt=0, name="@Internal Flash  /0x08000000/128*001Kg", serial="3CBJ"

dfu-util --list output of Longan Nano.

Found DFU: [28e9:0189] ver=1000, devnum=16, cfg=1, intf=0, path="1-4", alt=1, name="@Option Bytes  /0x1FFFF800/01*016 g", serial="3CBJ"
Found DFU: [28e9:0189] ver=1000, devnum=16, cfg=1, intf=0, path="1-4", alt=0, name="@Internal Flash  /0x08000000/512*002Kg", serial="3CBJ"

While Longan Nano can be erased with mass-erase command, bare chip always reports failure. If the bare chip is blank it can be programmed successfully. But if it is not blank it fails to program silently. Reporting success but read-out not matching.

If you erase the chip through JTAG with openocd, it can be programmed again.

Is there a way to properly erase this chip through DFU? Or is there a way to update bootloader in these chips? How can you tell the difference of these chips from their markings?

Any information is welcome.

elfmimi commented 3 years ago

Use dfu-util 0.10 . https://sourceforge.net/projects/dfu-util/files/