Author Topic: PSA: GD32F303 is not a drop in substitute for STM32F303  (Read 10056 times)

0 Members and 1 Guest are viewing this topic.

Offline OwOTopic starter

  • Super Contributor
  • ***
  • Posts: 1250
  • Country: cn
  • RF Engineer.
PSA: GD32F303 is not a drop in substitute for STM32F303
« on: October 12, 2019, 06:02:36 am »
I designed a board with a GD32F303 and discovered code for STM32F303 will not run on it (all peripheral accesses don't work), but code targeting STM32F103 does work and all tested peripherals (usb, dma, adc) work correctly. Initially I thought the chip was a relabeled GD32F103 but a detailed reading of the GD32F303 user manual and memory map revealed that the peripherals are identical to the F103. So the GD32F303 really is just a F103 with more ram and flash.
Email: OwOwOwOwO123@outlook.com
 
The following users thanked this post: oPossum, thm_w, I wanted a rude username

Offline lordium

  • Regular Contributor
  • *
  • Posts: 61
  • Country: cn
Re: PSA: GD32F303 is not a drop in substitute for STM32F303
« Reply #1 on: October 12, 2019, 06:37:23 am »
Where did you find information that said it would be a drop in replacement? Apart from the name being similar, they are 2 different companies. Are there any information from either of them stating anything like this? Seems like a expectation vs reality problem.
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11228
  • Country: us
    • Personal site
Re: PSA: GD32F303 is not a drop in substitute for STM32F303
« Reply #2 on: October 12, 2019, 06:38:54 am »
That's why it is a PSA, since many people would have the same expectation. There is really no point in discussing reasons for that for 1000th time.
Alex
 

Offline donotdespisethesnake

  • Super Contributor
  • ***
  • Posts: 1093
  • Country: gb
  • Embedded stuff
Re: PSA: GD32F303 is not a drop in substitute for STM32F303
« Reply #3 on: October 12, 2019, 09:38:10 am »
a detailed reading of the GD32F303 user manual and memory map revealed that the peripherals are identical to the F103.

PSA: RTFM !
Bob
"All you said is just a bunch of opinions."
 

Offline Rasz

  • Super Contributor
  • ***
  • Posts: 2616
  • Country: 00
    • My random blog.
Re: PSA: GD32F303 is not a drop in substitute for STM32F303
« Reply #4 on: October 12, 2019, 12:14:17 pm »
Quote from: donotdespisethesnake
PSA: RTFM !

more like PSA: dodgy vendor
Who logs in to gdm? Not I, said the duck.
My fireplace is on fire, but in all the wrong places.
 

Offline GromBeestje

  • Frequent Contributor
  • **
  • Posts: 276
  • Country: nl
Re: PSA: GD32F303 is not a drop in substitute for STM32F303
« Reply #5 on: October 13, 2019, 02:12:19 pm »
Quote from: donotdespisethesnake
PSA: RTFM !

more like PSA: dodgy vendor

I'm more like RTFM on this one.

Quote
So the GD32F303 really is just a F103 with more ram and flash.
The GD32F303 is a Cortex M4, versus an M3 for the F103. And there are more peripherals, like the DAC.  In that sense, the features are like an STM32F303. So, not a drop-in, but offers the same features
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14301
  • Country: fr
Re: PSA: GD32F303 is not a drop in substitute for STM32F303
« Reply #6 on: October 13, 2019, 03:27:47 pm »
So basically you're using a "clone" IC (at least you apparently chose it for this reason) and expect it to be a full clone, and are miffed when you discover, a bit late, that it's not.

Dunno if it's funny or sad. ;D
 
The following users thanked this post: Bassman59, Yansi

Offline OwOTopic starter

  • Super Contributor
  • ***
  • Posts: 1250
  • Country: cn
  • RF Engineer.
Re: PSA: GD32F303 is not a drop in substitute for STM32F303
« Reply #7 on: October 13, 2019, 05:27:00 pm »
Actually makes my job easier because all my existing code are F1 oriented and this saves having to port a lot of stuff. Don't know about the M4 vs M3 part though but binaries built for STM32F103 run on the GD32F303 with no modifications including the peripherals (currently tested: usb, adc, timer, dma, interrupts). I did make a small GD32 specific change though which is to allow running at 96MHz while using usb. I think I will end up porting the NanoVNA UI code to fit my codebase rather than the other way around since I don't feel like porting an outdated version of ChibiOS to this. One thing the gd32 lacks which is a regression is USB DFU, so firmware updates will require a st-link... EDIT: or usb-serial adapter
« Last Edit: October 13, 2019, 05:29:11 pm by OwO »
Email: OwOwOwOwO123@outlook.com
 
The following users thanked this post: thm_w, jhpadjustable

Offline jhpadjustable

  • Frequent Contributor
  • **
  • Posts: 295
  • Country: us
  • Salt 'n' pepper beard
Re: PSA: GD32F303 is not a drop in substitute for STM32F303
« Reply #8 on: October 13, 2019, 10:55:43 pm »
One thing the gd32 lacks which is a regression is USB DFU, so firmware updates will require a st-link... EDIT: or usb-serial adapter
I don't think the STM32F1 has a USB DFU bootloader either. If the F103 compatibility is that strong, an F103 bootloader from some random bloke on github might just work out of the box.
"There are more things in heaven and earth, Arduino, than are dreamt of in your philosophy."
 

Online thm_w

  • Super Contributor
  • ***
  • Posts: 6278
  • Country: ca
  • Non-expert
Re: PSA: GD32F303 is not a drop in substitute for STM32F303
« Reply #9 on: October 16, 2019, 01:21:04 am »
I would have done the exact same thing so no blame here. GD32F103 is a straight up drop in replacement, if 303 was not they should put it in the datasheet headline or on their site somewhere. OR differentiate the number at least a bit (FX303 whatever).

This is going to be very confusing because now you can't trust the PN, so any sort of flash size/ram size/etc would be suspect as well. Makes me less likely to use their ICs.
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 

Offline jhpadjustable

  • Frequent Contributor
  • **
  • Posts: 295
  • Country: us
  • Salt 'n' pepper beard
Re: PSA: GD32F303 is not a drop in substitute for STM32F303
« Reply #10 on: October 16, 2019, 01:57:39 am »
I would have done the exact same thing so no blame here. GD32F103 is a straight up drop in replacement, if 303 was not they should put it in the datasheet headline or on their site somewhere. OR differentiate the number at least a bit (FX303 whatever).
They did. Notice the GD in front? That should be a big flashing neon sign that you're in a different namespace now. Why on earth did you ever assume ST is a standards body?
"There are more things in heaven and earth, Arduino, than are dreamt of in your philosophy."
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: PSA: GD32F303 is not a drop in substitute for STM32F303
« Reply #11 on: October 16, 2019, 02:06:05 am »
Because so many ICs do follow that convention that the brand prefix is often not even mentioned. I would have made the same assumtion as well. Occasionally old EPROMs have different programming algorithms based on the brand but even those are drop-in replacements from a functional standpoint. I can't actually think of a case I've ever encountered where two ICs with the same part number beyond the vendor prefix were not compatible.
 
The following users thanked this post: thm_w

Offline langwadt

  • Super Contributor
  • ***
  • Posts: 4392
  • Country: dk
Re: PSA: GD32F303 is not a drop in substitute for STM32F303
« Reply #12 on: October 16, 2019, 02:21:29 am »
Because so many ICs do follow that convention that the brand prefix is often not even mentioned. I would have made the same assumtion as well. Occasionally old EPROMs have different programming algorithms based on the brand but even those are drop-in replacements from a functional standpoint. I can't actually think of a case I've ever encountered where two ICs with the same part number beyond the vendor prefix were not compatible.

I sure there are lots of analog parts
 

Offline jhpadjustable

  • Frequent Contributor
  • **
  • Posts: 295
  • Country: us
  • Salt 'n' pepper beard
Re: PSA: GD32F303 is not a drop in substitute for STM32F303
« Reply #13 on: October 16, 2019, 02:26:53 pm »
Memory and 74 series logic were standardized fairly early on by a proper standards body (JEDEC). Analog was mostly standardized, such as it was, by virtue of second-sourcing agreements and gentlemanly behavior. There aren't enough numbers left for that!  ;D
"There are more things in heaven and earth, Arduino, than are dreamt of in your philosophy."
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4196
  • Country: us
Re: PSA: GD32F303 is not a drop in substitute for STM32F303
« Reply #14 on: October 17, 2019, 08:32:46 am »
I was vaguely under the impression that the stm32f303 was a a proper superset of the stm32f103...


Other psa: the samc21 chips do not have usb...  (difference between a d20 and d21 is essentially usb.  Difference between c20 and c21 is... CAN.

 

Offline GromBeestje

  • Frequent Contributor
  • **
  • Posts: 276
  • Country: nl
Re: PSA: GD32F303 is not a drop in substitute for STM32F303
« Reply #15 on: October 17, 2019, 06:22:08 pm »
Looking at the migration guide STM32F1 to STM32F3 , https://www.st.com/content/ccc/resource/technical/document/application_note/8e/c8/8d/e3/ee/ff/44/e6/DM00073522.pdf/files/DM00073522.pdf/jcr:content/translations/en.DM00073522.pdf

This is true for the peripherals themselves, but they exist at different addresses,. So it won't be binary compatible, but up to high level source compatible (just by replacing the header files)

 

Offline SL4P

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
  • There's more value if you figure it out yourself!
Re: PSA: GD32F303 is not a drop in substitute for STM32F303
« Reply #16 on: October 20, 2019, 08:21:42 pm »
To a large extent, many of those ‘standards’ bodies like JEDEC became pointless when China started turning out real an fake components.
The desire to grab market share with non compliant or simply dodgy parts has polluted the water forever.
Don't ask a question if you aren't willing to listen to the answer.
 

Offline SL4P

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
  • There's more value if you figure it out yourself!
Re: PSA: GD32F303 is not a drop in substitute for STM32F303
« Reply #17 on: October 20, 2019, 08:49:49 pm »
Nothing illegal, just the data pool is contaminated.
Less reliable than if it had been followed strictly.
Don't ask a question if you aren't willing to listen to the answer.
 

Offline langwadt

  • Super Contributor
  • ***
  • Posts: 4392
  • Country: dk
Re: PSA: GD32F303 is not a drop in substitute for STM32F303
« Reply #18 on: October 20, 2019, 08:53:40 pm »
To a large extent, many of those ‘standards’ bodies like JEDEC became pointless when China started turning out real an fake components.
The desire to grab market share with non compliant or simply dodgy parts has polluted the water forever.

To my knowledge, making compatible parts or non JEDEC compliant part is not banned by any trade treaties.
If GigaDevice really wanted to be a dick, they can just put STM32 in their part number and print their own logo. Unless ST registers every single STM32 part number as a trademark, there's nothing illegal about it.

might not be able to register it as a trademark, back in the day Intel tried to trademark i586 (or similar) but it was denied so they started using names that they could get trademarked like Pentium
 

Offline jhpadjustable

  • Frequent Contributor
  • **
  • Posts: 295
  • Country: us
  • Salt 'n' pepper beard
Re: PSA: GD32F303 is not a drop in substitute for STM32F303
« Reply #19 on: October 20, 2019, 09:38:57 pm »
[might not be able to register it as a trademark, back in the day Intel tried to trademark i586 (or similar) but it was denied so they started using names that they could get trademarked like Pentium
Longer: https://tedium.co/2017/05/18/intel-386-486-trademark-battles/

Shorter: a mere number was judged too generic. They did successfully register i586, but lost interest in the whole idea when the i586 approval specifically disclaimed any trademark rights on the number 586 without the i at the front. Where is the outrage over the "321" op amps out there, some with RRIO, some not? :=\
"There are more things in heaven and earth, Arduino, than are dreamt of in your philosophy."
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf