GD32F103 RCT6 Variant

Boards based on the GigaDevices GD32F103 microcontroller
tim.vrakas
Posts: 2
Joined: Fri Jun 17, 2016 12:07 am

GD32F103 RCT6 Variant

Postby tim.vrakas » Fri Jun 17, 2016 12:20 am

Hello, I tried tried to use STMarduino to program a GD32F103RCT6 chip. I used the STM32F103RCT6 option, based on the assumption that it was compatible, The upload (by ST-Link SWD) was successful, but the blink sketch I loaded does not seem to function.

Is this because of some minor difference in the GD version, which is causing failure?

If that is unlikely, It could be because of the configuration of the chip, it installed in a self-balancing hover board thing, and the board does not appear to have an external Crystal or oscillator, pins 3-6 are all not connected (OSC in and out). I asume the chip uses some kind of internal crystal, does this need to be configured?

Thanks
Tim

User avatar
RogerClark
Posts: 5465
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: GD32F103 RCT6 Variant

Postby RogerClark » Fri Jun 17, 2016 4:08 am

tim.vrakas wrote:Is this because of some minor difference in the GD version, which is causing failure?

If that is unlikely, It could be because of the configuration of the chip, it installed in a self-balancing hover board thing, and the board does not appear to have an external Crystal or oscillator, pins 3-6 are all not connected (OSC in and out). I asume the chip uses some kind of internal crystal, does this need to be configured?

Thanks
Tim


Yikes.

No external osc...

The core is not configured to run on the internal osc, so it will hang during the startup code, as it waits (indefinitely for the external osc to start up).

If that board definitely doesnt have an external crystal, you would need to change quite a lot of settings and some code.

You'd need to copy the GD32F103C variant folder and change the startup code in boards.cpp, specifically code in setup_clocks(), and also the PLL multipler in boards_setup.cpp

And probably a load of other stuff, e.g. the delay code (as its just a bunch of nops)

I recall reading something about the stability of the internal RC osc not being that good, and therefore some things may never work, e.g. USB, and possibly serial (but this could just be hearsay )


BTW. Although the GD32F103C core does work, I have found issues with various things, e.g. SPI didn't seem to work with my ILI9341 LCD display, and I never had chance to work out why that was. SPI data seemed to be sent, but the display didnt like what it got.
It could be a issue with SPI mode or perhaps clock timinig etc, but I didn't have time to investigate.

simonf
Posts: 180
Joined: Sun Jul 26, 2015 4:03 pm

Re: GD32F103 RCT6 Variant

Postby simonf » Fri Jun 17, 2016 8:45 pm

RogerClark wrote:It could be a issue with SPI mode or perhaps clock timinig etc, but I didn't have time to investigate.


I read on another forum the spi/clk had to be a multiple of 8 unlike the STM, that was causing the spi problem. I will try and find the reference it was a Chinese site I google translated.

User avatar
RogerClark
Posts: 5465
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: GD32F103 RCT6 Variant

Postby RogerClark » Fri Jun 17, 2016 9:27 pm

Thanks Simon.

I am sure it would be fairly easy to analyse the SPI problem using my scope, but there always seems something more important or less time consuming that I need to do.

tim.vrakas
Posts: 2
Joined: Fri Jun 17, 2016 12:07 am

Re: GD32F103 RCT6 Variant

Postby tim.vrakas » Sat Jul 16, 2016 8:25 pm

Well to say the least that project got a bit sidetracked...

This is a cheap controller board for a "hoverboard"/swegway thing. There is no usb and no fast serial data so no surprise they cheaped on the crystal. I might just attach a clock source to the board. I really don't want to deal with non-standard hardware issues. (the overview of changes which you had clearly already simplified has already gone way over my head.

I will report back if I make any progress.

Thanks a lot for the help and for this awesome project!
Tim


Return to “GD32F103 boards”

Who is online

Users browsing this forum: No registered users and 1 guest