Where to buy 128K st-links?

Peter Lebbing peter at digitalbrains.com
Thu Feb 7 17:06:30 CET 2019

On 23/12/2018 13:34, Pablo Ovelleiro Corral wrote:
> Can anybody link me to a suppliers of those chips that delivers the
> 128K flash version? Has anybody build this and can share his
> experieces and where he got the device?

I was curious about chips other than the STM32F103CB capable of being
used as though they were, and these things are cheap. So I bought the
following three:




Now, I just /might/ have mixed them up upon reception, but I don't think
so. The first two have an STM32F103C8, which is officially the 64 KiB
version, but in all likelihood have 128 KiB.

The third one, the one from the WAVGAT Store, was more interesting. It
has a chip marked

| STM32
| GC102CB
| GH213 9U
| CHNO46

which you can see here:


I couldn't find what a GC102 is, does anybody know? Anyway, it reports
itself as a medium-density F10x does. I kinda forgot to save the log of
that OpenOCD session, but here is the output for a proper STM32F103CB:

| SWD IDCODE 0x1ba01477
| > flash probe 0
| device id = 0x20036410
| flash size = 128kbytes
| flash 'stm32f1x' found at 0x08000000

And I remember that this GC102CB reported the same numbers.

I checked the memory, and it has 128 KiB of flash and 20 KiB of RAM. I
used SWD to fill both memories with 32-bit words containing the word
address being programmed as the data, and I could read it back
succesfully. So the first word programmed to memory was 0x00000000, the
second word 0x00000001, etcetera. This should catch any address aliasing
occurring, and it worked fine. As soon as you tried to write beyond the
20 KiB RAM, OpenOCD would throw an error.

I flashed this thing with GnuK and am using it to see if there are any
(stability?) issues. It works, *but* I did notice that reGNUal failed!
So it is not 100% equal to an F103CB.

So if you order one of the others, you have a fair chance of receiving a
F103C8, which should be 128 KiB despite it not being marked as such. I
ordered another 5 from different suppliers to see what I'll get. I think
it's interesting to look at to what extent these chips that are marked
differently are usable, but I'm not giving it any priority at the

Does anybody know what the *bleep* an STM32GC102 is? What are
interesting registers to look at? I see the SWD IDCODE, the
DBGMCU_IDCODE register at 0xE0042000 (that's "device id" in the output
above) and the Flash size register at 0x1FFFF7E0, are there any more
interesting ones? I plan to compare a complete register space dump in
the future, but if it's too noisy I'll forego that avenue. I'm
currently using the device as a GnuK, so I can't do anything with it at
the moment.

This ST-Link V2 with the GC102 chip is running a normal GnuK fine, it's
config string is
Config: ST_DONGLE:dfu=no:debug=no:pinpad=no:certdo=yes:factory_reset=yes

I've seen people say they lowered the CPU clock frequency. I didn't
change a thing, so it's probably running at the normal 72 MHz, because I
think the USB will not work if the crystal doesn't match. So apparently
it matches.

This mail is signed with the device in question :-).



I use the GNU Privacy Guard (GnuPG) in combination with Enigmail.
You can send me encrypted mail if you want some privacy.
My key is available at <http://digitalbrains.com/2012/openpgp-key-peter>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.gnupg.org/pipermail/gnuk-users/attachments/20190207/b155dcb3/attachment.sig>

More information about the Gnuk-users mailing list