GD32F103VET6 board

cazimirb
Tue Feb 23, 2016 9:20 pm
I have some boards with STM32F103VCT6 and some GD32F103VET6 chips and plan to perform brain surgery on these boards and also replace the 8MHz quartz with a 12MHz one.
Does the GD32duino bootloader work with GD32F103VET6 at this time?
Thanks!

RogerClark
Tue Feb 23, 2016 10:10 pm
The STM32 version of the bootloader works on the V series devices, so I expect the GD version should also work on the V series.

The only thing that sometimes differs is which pin the LED is connected to, and whether there is a User button attached to a pin that can be used to lock the bootloader in DFU upload aka “perpetual bootloader mode”

Note. The bootloader does not do bounds checking for the end of Flash,,it relies on the IDE to check the code will fit.

Also note, you will need to make a new board variant in the IDE for those boards, mainly to set the flash and ram size.

Just copy the variant folder in question from the STM32 (I cant remember if you need to change anything, in the STM32 version, i think I changed the STM32 code to handle the faster clock freqs, so just try it and see if it works)


cazimirb
Tue Feb 23, 2016 10:39 pm
Thanks, Roger. I’ll give it a try and see how it works.

cazimirb
Thu Feb 25, 2016 5:59 pm
I tried, but didn’t succeed, so far..The upload of bootloader via St-Link was successful..but couldn’t make USB upload work: got ‘USB not recognized’ message..Other boards with STM32 chips are recognized as Maple serial port..

RogerClark
Thu Feb 25, 2016 8:13 pm
I cant remember if usb serial is enabled for STLINK uploads, you would need to look in boards.txt and make sure USB SERIAL is defined, otherwise the code does not get compiled into the sketch.

can you let me know what you did? Did you make a new board variant folder etc?


cazimirb
Thu Feb 25, 2016 9:11 pm
RogerClark wrote:Did you make a new board variant folder etc?

RogerClark
Thu Feb 25, 2016 10:33 pm
Ah Ok

If you use the GD32 version of the bootloader you need the 12Mhz Crystal (as my board had a 12MHz crystal).

I’m not sure if the STM32 version of the bootloader works on a 8Mhz GD32, I think it should do.

You need to check if your GD32 VET board has a pullup resistor on USB like the Red Pill does.

Or perhaps it has some reset hardware like the Maple mini does ??

Do you have a schematic?


cazimirb
Fri Feb 26, 2016 1:28 pm
The schematic was posted in this topic:
http://www.stm32duino.com/viewtopic.php?f=28&t=821

Specifically, the board schematic is: 1-STM32F103VET6mini.PDF, i.e.
http://www.stm32duino.com/download/file.php?id=367

I see that the pullup resistor on USB is present. The STM32duino bootloader works fine when using STM32 chip, but it doesn’t work with GD32 chip.
I will check tye board for bad connections.
Thanks!


RogerClark
Fri Feb 26, 2016 8:45 pm
I cant absolutely remember, but I think the main difference between the GD32 and the STM32 bootloader is just the crystal frequency.

I should really merge the two bootloaders together and have a setting in config for the crystal frequency

But at the time I did the GD32 bootloader it was unclear whether the GD32 was absolutely compatible with the STM32, but as time goes by, it looks more and more like the codebases could be merged.

From what I can remember, I added code to the STM32 code base, to allow different clock Multipliers. i.e to allow the STM32 to run at 48 and 72MHz , after writing the code for the GD32 (because the GD32 has 4 bits to control the USB divider PLL, and therefore you can run it at 48,72,96 and 120MHz and still have USB – where as the STM only has 2 bits for this control)


cazimirb
Mon Feb 29, 2016 9:47 pm
Thanks, Roger.
Update: USB upload worked, finally, with GD32duino. There was a bad soldering on USB pins of the chip, that I managed to repair.
Now I can confirm that GD32F103VET6 is pin compatible with STM32F103VCT6 and works with GD32duino.

RogerClark
Mon Feb 29, 2016 10:07 pm
@cazimirb

Thanks.

Bad connections on micro USB is a very common problem.

Often these connectors break off the board :-(

I recommend that people put glue over the connector to hold it down. I use a hot glue gun, but epoxy glue etc also works well


mrburnette
Tue Mar 01, 2016 2:47 am
cazimirb wrote:
<…>
Now I can confirm that GD32F103VET6 is pin compatible with STM32F103VCT6 and works with GD32duino.

cazimirb
Tue Mar 01, 2016 10:54 pm
After loading the GD32duino bootloader from STM32 ST-Link utility, I compiled and uploaded via USB a blink sketch from Arduino (selecting GD32F103C8 board).
Then, I tried again to connect the board via SWD, from STM32 ST-Link utility. The connection worked only after setting ‘connect under reset’ – pressing and releasing RESET while connecting to target. I couldn’t connect otherwise..Maybe this info is helpful to someone..

RogerClark
Tue Mar 01, 2016 11:05 pm
The reason you have to do connect under reset, is that the SWD pins get allocated as GPIO when the upload method is not STLink
So STLink will not connect, and you have to use connect under reset

If you upload directly to the board using STLink (no bootloader), then the SWD pins do not get allocated as GPIO, so you should not need to connect under reset


cazimirb
Wed Mar 02, 2016 10:58 am
Got it, thanks Roger.

simonf
Thu Jun 02, 2016 1:54 am
Looks like there’s a reasonable priced dev board coming along to try this out $US6

https://world.taobao.com/item/524685248 … 0.0.JPoGEX

It will be a while before it hits ebay/aliexpress (if it ever does)


RogerClark
Thu Jun 02, 2016 2:08 am
You have to be brave to use TaoBao

Often the agents fees make things much more expensive than just doing a direct currency conversion from the price shown on TaoBao its self


simonf
Thu Jun 02, 2016 2:27 am
RogerClark wrote:
Often the agents fees make things much more expensive….

Leave a Reply

Your email address will not be published. Required fields are marked *