Author Topic: Opinions on ST 32F407VGT6 versus Gigadevice GD32F407VGT6  (Read 16792 times)

0 Members and 1 Guest are viewing this topic.

Online ataradov

  • Super Contributor
  • ***
  • Posts: 12016
  • Country: us
    • Personal site
Re: Opinions on ST 32F407VGT6 versus Gigadevice GD32F407VGT6
« Reply #25 on: March 14, 2025, 02:53:46 pm »
There are additional 512 KB of RAM that shadows the flash and you have no direct access to. There is a total of 1 M of flash, half of which is shadowed. It works transparently, so you don't need to do anything about it, but it helps the performance if your code fits int the Code Area. If your whole thing fits into 512 K, then you take full advantage of zero wait state execution.
Alex
 
The following users thanked this post: peter-h

Offline peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 4632
  • Country: gb
  • Doing electronics since the 1960s...
Re: Opinions on ST 32F407VGT6 versus Gigadevice GD32F407VGT6
« Reply #26 on: March 14, 2025, 03:02:29 pm »
Thanks. My project is under 512k but in any case I can un#def stuff like MbedTLS and it shrinks by 50% :)

A quick read of the 69 page DS makes it clear that either this is

- An exact replica (at schematic/HDL level at least) in which case how did Giga get their hands on the peripherals? I know the USB and ETH are from Synopsys and in principle they could have licensed the same IP there, but there is much else on this chip...

- "Something similar" in which case the chances of code compatibility are close to zero, beyond trivial cases

The amount of regression testing needed would be eye-watering.

Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 12016
  • Country: us
    • Personal site
Re: Opinions on ST 32F407VGT6 versus Gigadevice GD32F407VGT6
« Reply #27 on: March 14, 2025, 03:09:43 pm »
They are re-implementation of IPs. ST IPs are really stable, so engineering effort required to replicate them is worth it.

There are minor subtle differences between the devices, especially when looking at the number of clock cycles it takes to do things. But for most straightforward use cases it does not matter. The code compatibility is really good unless you relied on some marginal behavior on the ST device.

For a real project you need to treat this as a full port to a largely compatible device and do all the testing you can. Simply compiling the same code and hoping it works is asking for trouble.

« Last Edit: March 14, 2025, 03:11:23 pm by ataradov »
Alex
 

Offline peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 4632
  • Country: gb
  • Doing electronics since the 1960s...
Re: Opinions on ST 32F407VGT6 versus Gigadevice GD32F407VGT6
« Reply #28 on: March 14, 2025, 03:41:27 pm »
Quote
For a real project you need to treat this as a full port to a largely compatible device and do all the testing you can. Simply compiling the same code and hoping it works is asking for trouble.

I may be misunderstanding you, but either your code runs or it doesn't. If it doesn't they you are back to square one but debugging half a meg of code will cost way way more than the price differential (unless you are building 100k+ qty). If it runs then you need to do a lot of testing but you will never be able to regression test everything.

So, I guess, the use of these chips is in the latter case and with "easy" customers or for new or in-house projects, or for a completely new project.

I can't even find the device ID in the DS... which should be same as the 32F407VGT6? It will be funny to see what Cube IDE does when loading it. I bought 10 to play with. I know Cube programs a 32F437 with a 417 (or even a 407) set up in the project (the 437 is a very close 417 but with 64k extra RAM) so it may not care.

Quote
re-implementation of IPs

What is that actually? You hand the RM to an HDL coder and ask him to emulate the config registers and the functional description?

I know a lot of chinese silicon is designed by Western design houses.
« Last Edit: March 14, 2025, 03:42:59 pm by peter-h »
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Offline AndyC_772

  • Super Contributor
  • ***
  • Posts: 4357
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
Re: Opinions on ST 32F407VGT6 versus Gigadevice GD32F407VGT6
« Reply #29 on: March 14, 2025, 03:46:26 pm »
I wouldn't bother doing any new design with STM32F4xx now. Look up STM32H52x and/or STM32H56x instead. They're new, functionally better in every way, and significantly cheaper.

Online ataradov

  • Super Contributor
  • ***
  • Posts: 12016
  • Country: us
    • Personal site
Re: Opinions on ST 32F407VGT6 versus Gigadevice GD32F407VGT6
« Reply #30 on: March 14, 2025, 03:51:17 pm »
I may be misunderstanding you, but either your code runs or it doesn't.
It will run after the changes to the PLL and other really low level initialization.

But you may see subtle difference in timing of accessing the registers, for example. Timer counter read taking 3 cycles instead of 2 or something like this will not matter for most applications, yet you may be doing something really specific, in which case you will have to re-calibrate your code. Same with GPIOs. If you did bit-banging and relied on register write time for timing, then slightly faster write time will throw off that timing.
And obviously, the code that is not subject to wait states will run much faster, so all your busy wait loops based on nops will have to be adjusted as well.

What is that actually? You hand the RM to an HDL coder and ask him to emulate the config registers and the functional description?
Yes, you take the device, take the RM and write a bunch of test cases and tweak the IP until it passes all those cases. If you estimate significant market demand, it makes sense to spend time doing that. It is not that hard to do either. And it was done multiple times by different companies.

I know a lot of chinese silicon is designed by Western design houses.
There is no need for conspiracies. GD is a legitimate company with office in the US. If there were any questions about IP cleanness, they would be sued out of existence.
Alex
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 16366
  • Country: fr
Re: Opinions on ST 32F407VGT6 versus Gigadevice GD32F407VGT6
« Reply #31 on: March 14, 2025, 03:58:53 pm »
Of course, and keep in mind most peripheral IPs in MCUs are not designed in-house but bought from third parties, Synopsys being a major provider. So, if stealing a peripheral IP from say ST, that would often mean stealing from Synopsys, and I'm sure Synopsys would not enjoy that very much either.
 

Offline peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 4632
  • Country: gb
  • Doing electronics since the 1960s...
Re: Opinions on ST 32F407VGT6 versus Gigadevice GD32F407VGT6
« Reply #32 on: March 14, 2025, 04:00:37 pm »
Quote
I wouldn't bother doing any new design with STM32F4xx now. Look up STM32H52x and/or STM32H56x instead. They're new, functionally better in every way, and significantly cheaper.

The STM32H563VGT6 for example (seems a superset of the 417) is priced in between the GD32F407VGT6 and the STM32F407VGT6. Factoring in the obvious political risk, I would agree re new designs IF you have zero existing expertise and investment :)

Quote
But you may see subtle difference in timing of accessing the registers, for example. Timer counter read taking 3 cycles instead of 2 or something like this will not matter for most applications, yet you may be doing something really specific, in which case you will have to re-calibrate your code. Same with GPIOs. If you did bit-banging and relied on register write time for timing, then slightly faster write time will throw off that timing.
And obviously, the code that is not subject to wait states will run much faster, so all your busy wait loops based on nops will have to be adjusted as well.

OK, sure. Actually I found that on the 417, FLASH loops run some 20% faster than from RAM. I found that when developing the RAM based boot loader.

Quote
that would often mean stealing from Synopsys, and I'm sure Synopsys would not enjoy that very much either.

I wasn't suggesting IP theft; merely that GD may not have done the peripheral design.

What is interesting is that the GD32F407VGT6 DS I see is dated 2016 and is edition 1.
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 16366
  • Country: fr
Re: Opinions on ST 32F407VGT6 versus Gigadevice GD32F407VGT6
« Reply #33 on: March 14, 2025, 04:02:53 pm »
I wasn't suggesting IP theft; merely that GD may not have done the peripheral design.

That is very likely. As I mentioned, most MCU vendors do exactly that, except possibly for the very niche peripherals that are designed in-house. That's not specific to chinese vendors at all.
 

Offline AndyC_772

  • Super Contributor
  • ***
  • Posts: 4357
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
Re: Opinions on ST 32F407VGT6 versus Gigadevice GD32F407VGT6
« Reply #34 on: March 14, 2025, 04:13:18 pm »
The STM32H563VGT6 for example (seems a superset of the 417) is priced in between the GD32F407VGT6 and the STM32F407VGT6. Factoring in the obvious political risk, I would agree re new designs IF you have zero existing expertise and investment :)

"zero"...!

I've spent the last 10 years of my life working with STM32F405, I have a huge amount of experience and tried, tested code for it.

That's also precisely _why_ it's now time to move on. That chip is very, very old now and the price difference between it and the newer parts is only going to increase. I wouldn't be at all surprised to see it go NRND within the next couple of years as ST tries to migrate users towards the newer 40nm parts.

250 MHz core and half the uA / MHz of the F4? Yes, please...

Offline peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 4632
  • Country: gb
  • Doing electronics since the 1960s...
Re: Opinions on ST 32F407VGT6 versus Gigadevice GD32F407VGT6
« Reply #35 on: March 14, 2025, 04:34:10 pm »
Quote
I wouldn't be at all surprised to see it go NRND within the next couple of years as ST tries to migrate users towards the newer 40nm parts.

Not anytime soon; they have been quoting 10 years for 15 years :)
https://www.st.com/en/microcontrollers-microprocessors/stm32f4-series.html



As I often say, much depends on whether you are paid by the hour to write code, or it is your own business and the buck stops with you if there is a problem in the field :)

I know there are the 480MHz parts, too, but IIRC they do draw about 2x the current of the 168MHz 417. But most users don't need a higher speed. What one wants is a second source, first of all...

Quote
It will run after the changes to the PLL and other really low level initialization.

If the GD device ID is something different, one could do a custom init for the GD part i.e. keep the same code. I already do that for the 437 v. 417 - I check the ID and just have a 64k bigger heap (the general stack moves up by 64k), plus tiny things like the 437 uses a different ADC channel for the chip temp...

« Last Edit: March 14, 2025, 04:37:06 pm by peter-h »
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Offline peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 4632
  • Country: gb
  • Doing electronics since the 1960s...
Re: Opinions on ST 32F407VGT6 versus Gigadevice GD32F407VGT6
« Reply #36 on: March 18, 2025, 11:09:53 am »
What amazes me is the zero level of uptake on these Chinese 32F4 threads, from actual users.

There are enough Chinese people on EEVBLOG after all.

The data sheet, from 2016 and never updated, is highly suspicious, and indicative of a product which almost nobody is using. Or maybe it has zero bugs :)
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Offline IOsetting

  • Regular Contributor
  • *
  • Posts: 68
  • Country: cn
Re: Opinions on ST 32F407VGT6 versus Gigadevice GD32F407VGT6
« Reply #37 on: March 18, 2025, 12:05:21 pm »
What amazes me is the zero level of uptake on these Chinese 32F4 threads, from actual users.

There are enough Chinese people on EEVBLOG after all.

The data sheet, from 2016 and never updated, is highly suspicious, and indicative of a product which almost nobody is using. Or maybe it has zero bugs :)

Hi Peter,

Please find the latest GD32F4xx datasheet and user manual here
https://www.gigadevice.com/product/mcu/mcus-product-selector/gd32f407vet6
The datasheet link
https://www.gigadevice.com.cn/Public/Uploads/uploadfile/files/20250315/GD32F407xxDatasheet_Rev2.9.pdf

 
The following users thanked this post: peter-h, SiliconWizard

Offline peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 4632
  • Country: gb
  • Doing electronics since the 1960s...
Re: Opinions on ST 32F407VGT6 versus Gigadevice GD32F407VGT6
« Reply #38 on: March 18, 2025, 12:20:42 pm »
Amazing - thank you!

I can't find the device ID there. Is it the same as the STM 32F407?
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Offline IOsetting

  • Regular Contributor
  • *
  • Posts: 68
  • Country: cn
Re: Opinions on ST 32F407VGT6 versus Gigadevice GD32F407VGT6
« Reply #39 on: March 18, 2025, 12:56:34 pm »
Amazing - thank you!

I can't find the device ID there. Is it the same as the STM 32F407?
You are welcome!

https://www.gigadevice.com.cn/Public/Uploads/uploadfile/files/20250317/GD32F4xx_User_Manual_Rev3.2.pdf
In user manual 12.4.1 ID code register (DBG_ID) , this should be the equivalent of DEV_ID of STM32.
 

Offline peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 4632
  • Country: gb
  • Doing electronics since the 1960s...
Re: Opinions on ST 32F407VGT6 versus Gigadevice GD32F407VGT6
« Reply #40 on: March 18, 2025, 01:06:00 pm »
I see the reg at 12.4.1 but no value mentioned.

It says

Reset value: 0xXXXX XXXX

EDIT:  I did some digging around for this FMC_ID and discovered these
From year 2020: https://easyelectronics.ru/img/ARM_kurs/STvsGD/Migration/compatibility%20sumup%20between%20GD32%20and%20STM32_V2.0.pdf
and https://www.slkoric.com/other-else-63359/55150-55792.html
« Last Edit: March 18, 2025, 04:41:30 pm by peter-h »
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Offline peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 4632
  • Country: gb
  • Doing electronics since the 1960s...
Re: Opinions on ST 32F407VGT6 versus Gigadevice GD32F407VGT6
« Reply #41 on: March 21, 2025, 08:37:13 am »
IOsetting has gone silent... I have ordered a few of the GD32F407VGT6 and will see if they work.
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Offline IOsetting

  • Regular Contributor
  • *
  • Posts: 68
  • Country: cn
Re: Opinions on ST 32F407VGT6 versus Gigadevice GD32F407VGT6
« Reply #42 on: March 24, 2025, 03:30:23 am »
IOsetting has gone silent... I have ordered a few of the GD32F407VGT6 and will see if they work.
My appologies! I never played with gd32f407 so I cannot answer your question :palm:  I have several gd32f303rc and gd32f303rg boards but their regs might not be the same.
 

Offline peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 4632
  • Country: gb
  • Doing electronics since the 1960s...
Re: Opinions on ST 32F407VGT6 versus Gigadevice GD32F407VGT6
« Reply #43 on: March 25, 2025, 11:11:12 am »
Did those chips have the same ID as the STM versions?
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 12016
  • Country: us
    • Personal site
Re: Opinions on ST 32F407VGT6 versus Gigadevice GD32F407VGT6
« Reply #44 on: March 25, 2025, 03:29:23 pm »
I have not seen those ID values documented anywhere. The only device I have a known value for is GD32F407VET6 and the value is 0x16080413. So, DEV_ID field (0x413) matches and REV_ID (0x1608) does not match any of the existing ST devices, but you would expect this field to be variable even for ST devices. And it logically should be different anyway.
Alex
 
The following users thanked this post: peter-h

Offline peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 4632
  • Country: gb
  • Doing electronics since the 1960s...
Re: Opinions on ST 32F407VGT6 versus Gigadevice GD32F407VGT6
« Reply #45 on: March 25, 2025, 06:55:59 pm »
That suggests the STLINK stuff should just work.

But this raised an interesting angle on my project: the ST32F417 and 407 are both 0x413. I am not currently supporting the 407 and wonder how one can auto-detect a 417.
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 12016
  • Country: us
    • Personal site
Re: Opinions on ST 32F407VGT6 versus Gigadevice GD32F407VGT6
« Reply #46 on: March 25, 2025, 07:53:43 pm »
Probably just try to write something into the crypto register and read back. I expect the devices are the same die with crypto stuff fused out.
Alex
 

Offline peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 4632
  • Country: gb
  • Doing electronics since the 1960s...
Re: Opinions on ST 32F407VGT6 versus Gigadevice GD32F407VGT6
« Reply #47 on: March 27, 2025, 07:58:58 am »
What are the PLL gotchas on the GD chip?

There isn't the 2000 page RM :)
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Offline uer166

  • Super Contributor
  • ***
  • Posts: 1059
  • Country: us
Re: Opinions on ST 32F407VGT6 versus Gigadevice GD32F407VGT6
« Reply #48 on: March 27, 2025, 09:53:34 am »
What are the PLL gotchas on the GD chip?

There isn't the 2000 page RM :)

There is the 1000-page one however! Both in EN and CN
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 12016
  • Country: us
    • Personal site
Re: Opinions on ST 32F407VGT6 versus Gigadevice GD32F407VGT6
« Reply #49 on: March 27, 2025, 02:28:47 pm »
What are the PLL gotchas on the GD chip?
Multiplier setting values are slightly different. GD has more options there.

There isn't the 2000 page RM :)
They do one single datasheet.
Alex
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf