Please Try Again When You Get Back Your Genuie Id

Whenever a product becomes pop, information technology's only a matter of fourth dimension before other companies kickoff feeling the urge to hitch a ride on this popularity. This miracle is the primary reason why so many terrible toys and video games have been produced over the years. Yet it also drives the earth of electronics. Hence it should come every bit no surprise that ST'southward highly successful ARM-based serial of microcontrollers (MCUs) has seen its share of imitations, clones and outright fakes.

The fakes are probably the most problematic, equally those fries pretend to be genuine STM32 parts down to the markings on the IC package, while compatibility with the part they are pretending to be can differ wildly. For the imitations and clones that carry their own markings, things are a scrap more fuzzy, as 1 could reasonably pretend that those companies just and so happened to accept designed MCUs that purely by coincidence happen to exist fully pin- and register compatible with those highly popular competing MCU designs. That would be the sincerest grade of flattery.

Let'south accept a wait at which fakes and imitations are effectually, and what it means if y'all end upward with one.

Beefcake of a forgery

Good STM32 IC on the left, clone on the correct, with extra dimples.

Earlier this year, Keir Fraser posted an informative summary of some fake STM32F103 ICs as found on and then-called 'Blue Pill' and similar boards on their Github. The forgeries carry the same marks on the packaging equally the genuine STM32 parts, but can often be identified past the pattern of dimples on the packaging, or by the quality of the silkscreen.

These forgeries aren't ever fully functional. As noted by Fraser, many of these parts cannot fifty-fifty be programmed properly, or even run lawmaking as simple as the universal 'blinky' instance. Information technology'due south possible that these forgeries are in fact defective STM32F103 dies or like that are being sold via less-than-legal channels.

The STM32FEB. STM32 it is not.

More insidious perchance are the near-forgeries that at get-go glance may wait similar the real office, but are betrayed by the identification on them: 'STM32FEBKC6'. That's not a legitimate ST parts code, and that should be the commencement tip. This is another clone that'southward likely to bring you nothing just grief, as even when information technology does work, it is a cut-down version of the STM32F103 pattern, with missing features. Finding detailed information on it is hard likewise.

Skillful artists copy

CS32F103. A more honest clone.

This leaves the trickiest of the clones, in the grade of the aforementioned CS32F103. This clone essentially works like the existent deal, and can run Blinky compiled for the STM32F103 but fine. Some of these MCUs may even be marked every bit the ST office, making them hard to identify conclusively.

Some of these are manufactured by CKS (中科芯微), a Chinese visitor who have apparently made a characteristic-complete version of the STM32F103, to the point where they have stock-still some of the errata listed in the ST datasheet. An commodity over at CNXSoft provides some more than details on this MCU.

A major difference 1 will quickly run across with this flake is when programming it and getting the message "UNEXPECTED idcode: 0x2ba01477". The reason for this is that the STM32F103 MCU reports the ID 0x1ba01477, confusing the programmer. This can be fixed for example in OpenOCD by using a configuration script that specifies either no CPUTAPID (0), or this ID reported past the CS32 MCU.

Giga clones

Probably one of the more famous STM32 clone makers is GigaDevice with their GD32 MCUs. As noted over at SMD Prutser in an article series, the GD32F103 appears to be a faster, more capable version of the STM32F103. It has a higher maximum clock speed and faster Wink storage, with a decapped unit of measurement showing that they used 2 dies inside the package. One for the MCU, and i for the Flash storage, allowing for a rather flexible style to change Flash sizes beyond their product range.

Decapped GD32F103 MCU. The separate Flash die is visible on summit.

At first glance the GD32 MCUs look more than attractive than the STM32F1 series, with significant increases in clock speed (72 versus 108 MHz) and Wink storage. While the Flash storage on the GD32 should exist very slow, beingness a serial SPI ROM, its utilise of SRAM on the MCU die to 'enshroud' the Wink storage means that information technology ends upwardly being much faster than on-die Flash storage, with zero wait states required even at full MCU clock speed.

A disadvantage of more SRAM instead of pure Flash is that information technology increases ability usage, especially in slumber manner. It also causes a (modest) boot-up delay when the SPI ROM's contents are copied into SRAM before the firmware tin can run. Depending on the application this may be an advantage or disadvantage. This is of course the same approach equally the ESP8266 MCU, which too uses an external SPI ROM for firmware.

When information technology comes to other GD32 devices, nonetheless, they seem to exist less eager to make direct clones. Their GDF303 MCU kept the same peripherals as the GDF103, even though those of the STM32F3 are arguably amend. This also prohibits their apply equally a driblet-in solution for STM32F3xx boards. Depending on one'southward opinion of the STM32F1 peripherals, this may also affect one'southward determination to employ those GD32 MCUs.

They're everywhere

Genuine CH32F103 MCU on Bluish Pill board.

Although I was enlightened of the aforementioned fakes and clones, I nevertheless came across a new one recently. This involved the buy of some 'Blue Pill' STM32F103 boards from a big German importer and reseller of all kinds of Maker tat. I wasn't proud of this, but I needed some cheap boards to use for BlackMagic probes, and they had a good bargain. In the comments for the Amazon list some people mentioned they got a genuine boards, while others mentioned that it was a 'imitation'.

In the spirit of morbid marvel, I got a couple of these boards and was both horrified and pleased to see that I had in fact received Blue Pill boards that did not behave the promised STM32F103C8T6 MCU, merely instead one marked CH32F103C8T6. On the bright side information technology did not claim to be an 'ST' part.

Genuine STM32F103 MCU on Blue Pill board.

This CH32F103 MCU is produced by a Chinese company called WCH, with the (Chinese-only) datasheets and reference manual both provided for download. At a cursory glance, both the datasheet and manaul show a chip that's practically identical to the STM32F103, with identical retention mapping and peripheral registers.

Hooking it up to an ST-Link/V2 dongle and connecting to information technology with OpenOCD results in the aforementioned CPUTAPID error every bit with the CS32F103 MCU when using the STM32F1xx profile file. After making the same alter to the stm32f1xx.cfg file as suggested by others, I was able to wink the 'Blinky' example from my Nodate STM32 projection onto the board without further issues.

This suggests that at least the bones RCC (reset & clock control), GPIO and SysTick functionality is similar enough for such a basic test to work. Next, I'll have to explore whether it too handles the USART, DMA, SPI, I2C and I2S functionality the same fashion as the STM32F103 MCU that I have on a few other boards. If this MCU is annihilation like the CS32F103 part, the answer is probably 'yes'.

Every bit for the seller's response when I contacted them nearly these Blue Pill boards not featuring the advertised STM32 function, they admitted that they were aware of this and claimed that 'in two months' they'd have boards with genuine STM32 parts once again. Admittedly that raises a lot more questions than it answers, least of all why they'd knowingly sell boards that practice not characteristic the advertised MCU.

Time to panic?

The eagle-eyed among us may have noticed that most all of these clones involve ST'due south first-generation Cortex-M MCUs (STM32F1 series). Unless y'all need to buy Blueish Pill boards for commercial projects, this is unlikely to practice more than seriously badger hobbyists and others who like to take a stack of $3 Cortex-M3 boards around for random projects. If i orders MCUs and development boards from reputable sellers such as Digikey and Mouser, it's also unlikely to be much of a concern.

The Blue Pill and Black Pill boards are likewise seeing a bit of an overhaul recently with updated versions featuring STM32F4-based MCUs. Although a bit more expensive than the STM32F103-based counterparts, they do bring considerably more than resources to the table and the much more pleasant (in my opinion) peripherals of the STM32F4 line. These may just make the market for the STM32F103 and with it these countless clones, counterfeits, and copies dry upwardly.

Until the first batches of counterfeit, cloned and copied STM32F401 and STM32F411 MCUs hit the market place, naturally. Because that's plain the proper name of the game.

goinrobse1985.blogspot.com

Source: https://hackaday.com/2020/10/22/stm32-clones-the-good-the-bad-and-the-ugly/

0 Response to "Please Try Again When You Get Back Your Genuie Id"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel