30KB Blue-Pill USB Binary testing image. - Page 1
Forum section: electronics / general

author: techman-001
author_rank: Frequent Contributor
timestamp: November 06, 2019, 03:27:24 pm
content: G'day,I've made up a Blue-Pill Image (30KB) that can be used to test if the USB on your board is working. It can also read the MCU internal ‘Device Electronic Signature’ and prints the results in a organized manner according to the STM32F0 tech sheet. The image boots on power up and runs in a 64KB Flash STM32F103.Commands are entered in a Terminal Emulator on a PC, connected to the USB device on the board ("<Mecrisp STM32F10x Forth Serial Port>")This uses the Mecrisp-Stellaris USB driver for STM32F103 by Jean-Claude Wippler.I've tested it on a Shenzhen LC Technology board with a STM32F103C8T6 MCU as I don't have a Blue-Pill.For more info:https://mecrisp-stellaris-folkdoc.sourceforge.io/f1-usb.html#stm32f1-usbImage tarball download link:https://sourceforge.net/projects/mecrisp-stellaris-folkdoc/files/mecrisp-stellaris-1882bdaff62f637a7bdd517d14f4c1a4.tar.gz/download

author: iMo
author_rank: Super Contributor
timestamp: November 06, 2019, 08:09:27 pm
content: Most STM32F103C8T6 chips in BluePills have got 128kB of flash..I'll try with mine (it has got 128kB).BPill N1:Code:ok.stm32idDie xy coords: 107806536Wafer Number: 113Lot_num ascii encoded [23:0]: 0x00564989 | V I .Lot_num ascii encoded [55:24]: 0x67255444 | g % T Dok.freeFLASH.. TOTAL REPORTED: 65536 USED: 51200 FREE: 14336RAM.... TOTAL PRESET: 20000 USED: 868 FREE: 19132ok.BPill N2:Code:ok.stm32idDie xy coords: 107741009Wafer Number: 117Lot_num ascii encoded [23:0]: 0x00535783 | S W .Lot_num ascii encoded [55:24]: 0x81174113 | . . A .ok.freeFLASH.. TOTAL REPORTED: 65536 USED: 51200 FREE: 14336RAM.... TOTAL PRESET: 20000 USED: 868 FREE: 19132ok.And the STM32F103ZET (144pinner with 512kB flash and 64kB ram):Code:ok.stm32idDie xy coords: 97779505Wafer Number: 78Lot_num ascii encoded [23:0]: 0x00383341 | 8 3 ALot_num ascii encoded [55:24]: 0x51137004 | Q . p .ok.freeFLASH.. TOTAL REPORTED: 524288 USED: 51200 FREE: 473088RAM.... TOTAL PRESET: 20000 USED: 868 FREE: 19132ok.@techman: it would be great if it would report therealflash and ram sizes. With most current genuine STM32F103XYZ the real amount of flash is 2x of the declared in DS (and maybe the ram is bigger too).

author: thm_w
author_rank: Super Contributor
timestamp: November 06, 2019, 09:35:01 pm
content: Thanks for posting this. For anyone else wondering, this worked best in windows: power on device let it enumerate on COM port, then use terminal software to connect (115k or any baud), then send the command stm32id to see if it responds.Bluepill (marked as STM32F103C8T6):Code:Die xy coords: 108068690Wafer Number: 114Lot_num ascii encoded [23:0]: 0x00525366 | R S fLot_num ascii encoded [55:24]: 0x67145016 | g . P .FLASH.. TOTAL REPORTED: 65536 USED: 51200 FREE: 14336RAM.... TOTAL PRESET: 20000 USED: 868 FREE: 19132Genuine STM32F103 #1:Code:Die xy coords: 107740976Wafer Number: 48Lot_num ascii encoded [23:0]: 0x00395435 | 9 T 5Lot_num ascii encoded [55:24]: 0x51211941 | Q ! . AFLASH.. TOTAL REPORTED: 65536 USED: 51200 FREE: 14336RAM.... TOTAL PRESET: 20000 USED: 868 FREE: 19132Genuine STM32F103 #2:Code:Die xy coords: 108199728Wafer Number: 48Lot_num ascii encoded [23:0]: 0x00395435 | 9 T 5Lot_num ascii encoded [55:24]: 0x51211940 | Q ! . @FLASH.. TOTAL REPORTED: 65536 USED: 51200 FREE: 14336RAM.... TOTAL PRESET: 20000 USED: 868 FREE: 19132I tried it on a GD32F103C8T6 on a custom board and got "Device descriptor request failed". I'm not sure if this is a hardware issue (it has single 8MHz crystal, no LSE), or related to the chip itself.. will have to try on the same hardware with genuine STM32 when I get home and update.edit: arduino FW works with the GD32 so it must be doing something different to initialize the USB:https://github.com/rogerclarkmelbourne/STM32duino-bootloader/blob/master/binaries/generic_boot20_pc13.bin(they mention a lot of tricks in the documentation).edit2: the OPs FW works OK on the same board with a genuine STM32, so clearly there are some differences in how the GD32 behaves with respect to USB.

author: iMo
author_rank: Super Contributor
timestamp: November 06, 2019, 09:40:15 pm
content: GD32F103 is a flash less chip. There is an SPI (8pin) 64kB flash chip bonded on the top of the arm chip, loading the actual flash image into the GD's sram (64kB+20kB) upon reset. Interesting to see what it will report

author: Macbeth
author_rank: Super Contributor
timestamp: November 06, 2019, 10:50:24 pm
content: Ok, my "good" bluepill board I have only had a day to play with, but appears to work flawlessly:My POS bluepill board that requires reconfiguring GDB, does not work with Windows STM debug at all, and the only USB device implementation that works for some reason I would love to know how/why, Mecrisp-stellaris virtual com port.As an aside from the bluepill boards - I have to say I haven't used Forth since the mid 80's. It was one of the few Acornsoft tapes I bought for my BBC Micro back then. Unfortunately it took up so much space in RAM that it was very limited for the graphics/games I wanted it to be used for programming. BBC Basic (in the ROM page) included an inline 6502 assembler which was excellent and I resorted to that, but I did kind of like the very low level of Forth and its RPN and stack back then. It was pretty much like 6502 with all the push and pops hidden under the cover.

author: techman-001
author_rank: Frequent Contributor
timestamp: November 06, 2019, 11:13:15 pm
content: Thanks for the feedback.The Flash size is read from the chip "Flash size register" as per the F103 datasheet and the ram is just a constant from the datasheet ram specs as there is no "ram size register.30.1.1 Flash size registerBase address: 0x1FFF F7E0Bits 15:0 F_SIZE: Flash memory sizeIndicates the Flash memory size of the device in Kbytes.Example: 0x0080 = 128 Kbytes.

author: techman-001
author_rank: Frequent Contributor
timestamp: November 06, 2019, 11:36:49 pm
content: Quote from: Macbeth on November 06, 2019, 10:50:24 pmThe "good" board ID looks standard but the POS unit ID 'lot number' definitely doesn't.Coupled with the fact GDB doesn't like it I'm guessing a fake chip especially if the chip label claims to be a STM32F103C8T6 ?Thanks for testing, Forth is still around today and still doing what it did in the 70's but on modern chips and with modern IDE's.All the peripheral register real time config listed below can be read (where reading is supported) by adding a "." period after the name.PWRRCCGPIOAGPIOBGPIOCAFIOEXTIDMA1SDIORTCTIM1I2C1SPI1USART1ADC1NVICI.e.nvic.NVIC_ICTR (read-only) $000000013|3|2|2|2|2|2|2|2|2|2|2|1|1|1|1|1|1|1|1|1|1|1|0|9|8|7|6|5|4|3|2|1|0|9|8|7|6|5|4|3|2|1|0|9|8|7|6|5|4|3|2|1|00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1NVIC_STIR (write-only) $000000003|3|2|2|2|2|2|2|2|2|2|2|1|1|1|1|1|1|1|1|1|1|1|0|9|8|7|6|5|4|3|2|1|0|9|8|7|6|5|4|3|2|1|0|9|8|7|6|5|4|3|2|1|00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0NVIC_ISER0 (read-write) $000000403|3|2|2|2|2|2|2|2|2|2|2|1|1|1|1|1|1|1|1|1|1|1|0|9|8|7|6|5|4|3|2|1|0|9|8|7|6|5|4|3|2|1|0|9|8|7|6|5|4|3|2|1|00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0NVIC_ISER1 (read-write) $000001003|3|2|2|2|2|2|2|2|2|2|2|1|1|1|1|1|1|1|1|1|1|1|0|9|8|7|6|5|4|3|2|1|0|9|8|7|6|5|4|3|2|1|0|9|8|7|6|5|4|3|2|1|00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0Any sub register cab be read by itself by adding a period after the name, they don't have to be printed in a large group.NVIC_ISER1.NVIC_ISER1 (read-write) $000001003|3|2|2|2|2|2|2|2|2|2|2|1|1|1|1|1|1|1|1|1|1|1|0|9|8|7|6|5|4|3|2|1|0|9|8|7|6|5|4|3|2|1|0|9|8|7|6|5|4|3|2|1|00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0ok.

author: techman-001
author_rank: Frequent Contributor
timestamp: November 07, 2019, 01:04:37 am
content: Quote from: Macbeth on November 06, 2019, 10:50:24 pmNow you have a modern Forth running at 72MHz on your bluepills to play around with if you so desireMecrisp-Stellaris also has a image for the modern BBC Microbit listed here, it's 20 from the top:-https://mecrisp-stellaris-folkdoc.sourceforge.io/supported-hardware.html?highlight=supported

author: techman-001
author_rank: Frequent Contributor
timestamp: November 07, 2019, 01:56:34 am
content: Quote from: techman-001 on November 06, 2019, 03:27:24 pmWhen submitting your results,please paste the text in your replyrather than pictures because text is a lot easier for me to tabulate the results.1882bdaff62f637a7bdd517d14f4c1a4.bin User ResultsSTM32F103C8T6This is the chip I developed my 1882bdaff62f637a7bdd517d14f4c1a4.bin image on. It’s in a $9 Shenzhen LC Technology board. 64KB Flash.Die xy coords: 108068691Wafer Number: 80Lot_num ascii encoded [23:0]: 0x00555071 | U P qLot_num ascii encoded [55:24]: 0x87011723 | . . . #STM32F103ZET144pinner with 512kB flash and 64kB ramDie xy coords: 97779505Wafer Number: 78Lot_num ascii encoded [23:0]: 0x00383341 | 8 3 ALot_num ascii encoded [55:24]: 0x51137004 | Q . p .FLASH.. TOTAL REPORTED: 524288 USED: 51200 FREE: 473088RAM.... TOTAL PRESET: 20000 USED: 868 FREE: 19132BPill N1(it has got 128kB).Die xy coords: 107806536Wafer Number: 113Lot_num ascii encoded [23:0]: 0x00564989 | V I .Lot_num ascii encoded [55:24]: 0x67255444 | g % T DFLASH.. TOTAL REPORTED: 65536 USED: 51200 FREE: 14336RAM.... TOTAL PRESET: 20000 USED: 868 FREE: 19132BPill N2(it has got 128kB).Die xy coords: 107741009Wafer Number: 117Lot_num ascii encoded [23:0]: 0x00535783 | S W .Lot_num ascii encoded [55:24]: 0x81174113 | . . A .FLASH.. TOTAL REPORTED: 65536 USED: 51200 FREE: 14336RAM.... TOTAL PRESET: 20000 USED: 868 FREE: 19132Bluepillmarked as STM32F103C8T6Die xy coords: 108068690Wafer Number: 114Lot_num ascii encoded [23:0]: 0x00525366 | R S fLot_num ascii encoded [55:24]: 0x67145016 | g . P .FLASH.. TOTAL REPORTED: 65536 USED: 51200 FREE: 14336RAM.... TOTAL PRESET: 20000 USED: 868 FREE: 19132GD32F103C8T6“Device descriptor request failed”Good BluepillDie xy coords: 107806545Wafer Number: 80Lot_num ascii encoded [23:0]: 0x00525680 | R V .Lot_num ascii encoded [55:24]: 0x87192455 | . . $ UPOS BluepillRequires reconfiguring GDB, does not work with Windows STM debug at all.Die xy coords: 74414100Wafer Number: 47Lot_num ascii encoded [23:0]: 0x00525680 | . . .Lot_num ascii encoded [55:24]: 0x87192455 | . . .Note: the total lack of Ascii data is telling.

author: thm_w
author_rank: Super Contributor
timestamp: November 07, 2019, 05:24:14 am
content: Added two genuine STM32 from LCSC, they are off by 1 lot number.

author: GromBeestje
author_rank: Frequent Contributor
timestamp: November 07, 2019, 07:22:54 pm
content: These are some results from some bluepills I've laying around (with the R10 replaced with the proper value)BluepillCode:Die xy coords: 107741008Wafer Number: 73Lot_num ascii encoded [23:0]: 0x00485572 | H U rLot_num ascii encoded [55:24]: 0x87243926 | . $ 9 &BluepillCode:Die xy coords: 108265297Wafer Number: 72Lot_num ascii encoded [23:0]: 0x00515782 | Q W .Lot_num ascii encoded [55:24]: 0x87061344 | . . . DBluepillCode:Die xy coords: 108068681Wafer Number: 73Lot_num ascii encoded [23:0]: 0x00545682 | T V .Lot_num ascii encoded [55:24]: 0x87055015 | . . P .Bluepill (this one didn't want to program with st-flash as in the supplied script. Programs fine with openocd)Code:Die xy coords: 108134227Wafer Number: 113Lot_num ascii encoded [23:0]: 0x00544872 | T H rLot_num ascii encoded [55:24]: 0x67041446 | g . . FBluepillCode:Die xy coords: 108003154Wafer Number: 72Lot_num ascii encoded [23:0]: 0x00565388 | V S .Lot_num ascii encoded [55:24]: 0x87093153 | . . 1 SThis firmware seems to be incompatible with GD32F103C8T6 on my own board. On the same board configuration, I have managed to get it running with an STM32 chip (by manually pulling up the D+ line, as I used a GPIO pin for that)STM32F103CBT6 on my own boardCode:Die xy coords: 108199730Wafer Number: 52Lot_num ascii encoded [23:0]: 0x00353254 | 5 2 TLot_num ascii encoded [55:24]: 0x57012556 | W . % VI have some other *32F103 chips laying around (MM32, BLM32, CS32)I am waiting for some PCBs to solder them on, then I can test them too,

author: techman-001
author_rank: Frequent Contributor
timestamp: November 07, 2019, 07:55:15 pm
content: Quote from: GromBeestje on November 07, 2019, 07:22:54 pmThank you for the feedbackNo one can read the GD32F103C8T6 so far, so it must have some USB differences to the STM32F103xxxx and the CKS32F103C8T6 ?My up to date chip feedback listing (including your feedback) is at the end of my original doc page:https://mecrisp-stellaris-folkdoc.sourceforge.io/f1-usb.html#stm32f1-usb

author: GromBeestje
author_rank: Frequent Contributor
timestamp: November 07, 2019, 09:22:46 pm
content: QuoteOr something else that is accessed during initialisation of your code. It seems to hang up to a state where the debugger won't connect unless I press the reset button.Is it possible to have a build that makes PC13 high, as I use this pin as USB pullup pin in my board design, rather then have it hard-wired. That would make the testing of the chips I've waiting easier.I'm also waiting for an APM32F103C8T6 as this one has appeared on lcsc. I'm planning to run some tests on the various 32F103 chips out there.

author: thm_w
author_rank: Super Contributor
timestamp: November 07, 2019, 10:22:45 pm
content: Quote from: GromBeestje on November 07, 2019, 09:22:46 pmWow I would not have expected yet another competitor. Would like to see those tests.So GD32F103C8T6 is $1.60 and 64kB of flash, but this thing is $1.30 or less with claimed 128kB flash. Undercutting each other like crazy. I did a quick glance at the datasheet and didn't see anything pop out so I am assuming its another "direct" clone in terms of feature-set. The GD32 might still be faster due to its unique architecture though.

author: Macbeth
author_rank: Super Contributor
timestamp: November 07, 2019, 11:48:38 pm
content: Quote from: techman-001 on November 07, 2019, 01:56:34 amI agree. I was only playing "follow by example" considering your initial post was in screenshot form.I will also point out that my "POS Bluepill" with blatantly fake STM32 micro should have its ASCII data corrected because you have recorded it wrong:Die xy coords: 74414100Wafer Number: 47Lot_num ascii encoded [23:0]:0x000E0014| . . .Lot_num ascii encoded [55:24]:0x170707E2| . . . .The other obvious wrong 'un is the free flash report:FLASH FREE: 0vs14336for every other STM32 F103C8T6 contender.

author: techman-001
author_rank: Frequent Contributor
timestamp: November 08, 2019, 12:24:26 am
content: Quote from: Macbeth on November 07, 2019, 11:48:38 pmFixed!I've no idea what's wrong with the Ram free result.

author: techman-001
author_rank: Frequent Contributor
timestamp: November 08, 2019, 06:04:36 am
content: Quote from: GromBeestje on November 07, 2019, 09:22:46 pmSure, grab your custom version herehttps://sourceforge.net/projects/mecrisp-stellaris-folkdoc/files/513f0474ceda9d0979fd5631ee862479.tar.gz/downloadSpecial image for GromBeestje=============================* boots in USB 'virtual serial port' mode* gpioc-13 is high on power-up* gpioc-13 can be lowered by entering "pc13off" and raised again by "pc13on"* USB terminal can revert to USART2 by entering "-usb". Speed is 460800 Baud.=========== ============= =====================USART2 MCU Signal 3.3v/USB Dongle=========== ============= =====================PA1 RTS CTSPA2 TX RXPA3 RX TX=========== ============= =====================* USART2 terminal can revert to USB by entering "+usb"This image runs from the USB port on any STM32F103 on power-up.This uses the Mecrisp-Stellaris USB driver for STM32F103 by Jean-Claude Wippler which is based on the Coreforth USB driver by Eckhart Köppen.1. Flash 513f0474ceda9d0979fd5631ee862479.bin image to board using your usual method2. Connect blue pill USB port to PC and look for "<Mecrisp STM32F10x Forth Serial Port>" device in your system3. Connect a PC serial terminal to the USB device above, you can choose any Baud Rate. NOTE: There is NO HANDSHAKING,so a End Of Line Delay of 200ms will required for uploads.4. You should see "MS RA 2.5.1 tpmod for STM32F103 by Matthias Koch" at board power upSee the 513f0474ceda9d0979f~ee862479.README.txt for further details.

author: Macbeth
author_rank: Super Contributor
timestamp: November 08, 2019, 01:58:27 pm
content: Just checked my other 2 boards:Good Bluepill #2Code:Die xy coords: 108068680Wafer Number: 113Lot_num ascii encoded [23:0]: 0x00565366 | V S fLot_num ascii encoded [55:24]: 0x67133045 | g . 0 EFLASH.. TOTAL REPORTED: 131072 USED: 51200 FREE: 79872Interesting. This boards STM32 F103C8T6 device marking is exactly the same as my other991KA 93 MYS 903(week 3 of 2019?) but this one reports 128K vs 64K. STM32 ST-LINK confirms this.Bad Bluepill #2Code:Die xy coords: 74414100Wafer Number: 63Lot_num ascii encoded [23:0]: 0x000E000C | . . .Lot_num ascii encoded [55:24]: 0x170707E2 | . . . .FLASH.. TOTAL REPORTED: 65536 USED: 65536 FREE: 0

author: techman-001
author_rank: Frequent Contributor
timestamp: November 08, 2019, 03:07:55 pm
content: Quote from: Macbeth on November 08, 2019, 01:58:27 pmSt-link would only do what I do, namely look in the MCU factory flash memory register.The fact that two similarly marked MCU's have different Flash memory would tend to imply that one or another has been reprinted because of scratch damage from a ewaste pull ?No way that STM QA would allow that kind of error.

author: techman-001
author_rank: Frequent Contributor
timestamp: November 08, 2019, 11:40:21 pm
content: Quote from: techman-001 on November 06, 2019, 03:27:24 pmI've just discovered the driver pulses PA12 (Open-Drain Output) low for 1ms at USB start up. This is to to briefly pull USB-DP down but is board specific.

author: techman-001
author_rank: Frequent Contributor
timestamp: November 08, 2019, 11:42:15 pm
content: Quote from: techman-001 on November 06, 2019, 03:27:24 pmThis image also pulses PA12 (Open-Drain Output) low for 1ms at USB start up. This is to to briefly pull USB-DP down but will be board specific.

author: craif
author_rank: Newbie
timestamp: January 30, 2020, 05:02:58 am
content: 2 boards bought off amazon a week ago as a pair with a random st-linkv2. Advertised as "initeq] STM32 ARM STM32F103C8T6 Blue Pill Minimum System Development Board"The top one actually has a fully numeric id, but its brother from the same lot has a single "B" hiding in it... so... 2 fakes? Maybe someone is cutting their batches with fakes? ¯\_(ツ)_/¯?The writing on both is maddeningly faint, but they both readSTM32F103C8T6991KA 93MYS 903topCode:stm32idDie xy coords: 108003144Wafer Number: 73Lot_num ascii encoded [23:0]: 0x00505689 | P V .Lot_num ascii encoded [55:24]: 0x87071342 | . . . Bok.free (bytes)FLASH.. TOTAL REPORTED: 65536 USED: 63800 FREE: 1736RAM.... TOTAL PRESET: 20000 USED: 960 FREE: 19040bottomCode:stm32idDie xy coords: 107872310Wafer Number: 49Lot_num ascii encoded [23:0]: 0x0031304B | 1 0 KLot_num ascii encoded [55:24]: 0x43113133 | C . 1 3ok.free (bytes)FLASH.. TOTAL REPORTED: 65536 USED: 63800 FREE: 1736RAM.... TOTAL PRESET: 20000 USED: 960 FREE: 19040The jumper's on the bottom ones each lost a shoulder while I've been goofing off with them.I've worked with microcontrollers before, but these are my first STM32s so I've been attributing any fighting I've done with them to my own dumb ass rather than something working out of spec.... Honestly that still seems more likely.

author: techman-001
author_rank: Frequent Contributor
timestamp: January 30, 2020, 06:11:23 am
content: Quote from: craif on January 30, 2020, 05:02:58 amThanks for the info, you don't need a dumb ass to fight Cortex-M3, I've been fighting it for yearsDo either chip have a 'hidden' second 64kB Flash ?You can test for that with the STM32F103C8-DIAGNOSTICS.bin here:https://sourceforge.net/projects/mecrisp-stellaris-folkdoc/files/STM32F103C8-DIAGNOSTICS.bin/downloadGenerally if it advertises 64kB Flash, doesn't have any HEX in the lot numbers but has a second 64kB block that passes test with option "T" in the program above, then it's a STM32F103C8.If it doesn't have any HEX in the lot numbers, advertises 64kB Flash and fails option "T" then it may be a CKSI think your second unit is a CKS as it does have HEX in the lot numbers.The STM32F103 is a very complex chip and if you don't know it very well you could waste weeks, months following the STM32 datasheet and running into problems because it's a CKS and has some differences.The only way to be sure is to buy a STM32F103 Discovery or Nucleo board and compare the suspect blue pill(s) with STM factory board, but as the Blue Pills are only ~$2 each, is it even worth it ?Note: I'm close to releasing a V2 of my Diags program that gives (I hope) more useful test based information.

author: craif
author_rank: Newbie
timestamp: January 30, 2020, 06:55:15 am
content: Did the flash test but forgot to post it. They both passed!top (decimal id)Code:Testing 64kB Flash block: 0x10000 - 0x1FFFFErasingFlash with 1010101010101010 (0xAA)Testing for 0xAA - OKErasingFlash with 0101010101010101 (0x55)Testing for 0x55 - OKErasing~~~~~ ALL TESTS PASSED ~~~~~bottom (hex id)Code:Testing 64kB Flash block: 0x10000 - 0x1FFFFErasingFlash with 1010101010101010 (0xAA)Testing for 0xAA - OKErasingFlash with 0101010101010101 (0x55)Testing for 0x55 - OKErasing~~~~~ ALL TESTS PASSED ~~~~~I'll be sure to grab the new tool once its out.

author: techman-001
author_rank: Frequent Contributor
timestamp: January 30, 2020, 12:01:52 pm
content: Quote from: craif on January 30, 2020, 06:55:15 amThanks for the updateI think you have two STM32F103C8's there as the hidden and working 2nd 64kB block seems to be a feature of that chip only.Your STM32F103C8 chip below is the first I have seen with a Alpha character in the Lot Numbers which means that my theory that STM32F103C8's don't have alphanumerics in their Lot Numbers is nowBUSTED!Die xy coords: 107872310Wafer Number: 49Lot_num ascii encoded [23:0]: 0x0031304B | 1 0 KNot handling the "0x00" character was aBUGI have fixed in the upcoming V2 release, so yours should have read:Lot_num ascii encoded [23:0]: 0x0031304B | . 1 0 K (where the "." means "non-printable ASCII character") . "4B" is the (hex) ASCII code for "K".Those with a Linux/*bsd pc's can type "man ascii" for a nice chart showing octal,decimal and hex ASCII tables to see what I mean.

author: westfw
author_rank: Super Contributor
timestamp: February 01, 2020, 08:50:00 am
content: So, real stm32s don’t match their datasheet (they have the extra 64k flash), but the fake ones do?

author: iMo
author_rank: Super Contributor
timestamp: February 01, 2020, 09:20:44 am
content: ..that is because STM is faking their own chips..

author: techman-001
author_rank: Frequent Contributor
timestamp: February 01, 2020, 09:29:51 am
content: Quote from: westfw on February 01, 2020, 08:50:00 amlol. It's only the STM32F103C8 that has the 'hidden' Flash as far as I know, and that chip is ancient.I expect that even ST Micro isn't immune to the whims of sales and marketing droids.

author: techman-001
author_rank: Frequent Contributor
timestamp: February 01, 2020, 09:30:39 am
content: Quote from: imo on February 01, 2020, 09:20:44 amIf you can't beat em, join em!

author: JensG
author_rank: Newbie
timestamp: February 24, 2020, 09:02:40 am
content: Hello,unfortunatley some of my cheap bluepills are the ones with the 3 notches on the mcu.the wrong pullup resistor was not the cause for no usb connection.this mecrisp testing image is working fine. the fake bluepill connects as virtual com port.i have a image for a hid controller and with it the fake bluepill has no usb.does this fake bluepill have the ability working as hid controller or only as com port ?

author: techman-001
author_rank: Frequent Contributor
timestamp: February 24, 2020, 09:16:59 am
content: Quote from: JensG on February 24, 2020, 09:02:40 amThat may depend on the actual MCU ?Have you tried my new image stm32f103xx-diagnostics ?It has better detection of the actual chip, and more accurate information, plus produces a XML output of all the data if desired.https://mecrisp-stellaris-folkdoc.sourceforge.io/stm32f1xx-diagnostics.html#stm32f103xx-diagnostics

author: JensG
author_rank: Newbie
timestamp: February 24, 2020, 05:02:23 pm
content: i tried the latest image:<?xml version='1.0' encoding='UTF-8'?><DEVICE xs:noNamespaceSchemaLocation='STM32F103_DIAGNOSTICS_V2.0.XSD'><DEBUG><IDCODE>$20036410 </IDCODE></DEBUG><DERIVED><DUID>01684E26 </DUID><FLASH-SIZE>65536 </FLASH-SIZE></DERIVED><EXTERNAL-MARKINGS><STM32F103C8>0 </STM32F103C8><STM32F103CB>0 </STM32F103CB><CS32orAPM32>0 </CS32orAPM32><GD32F103>0 </GD32F103><OTHER>0 </OTHER></EXTERNAL-MARKINGS><FLASH><SIZE-REGISTER>$FFFF0040 </SIZE-REGISTER><SECOND-64KB-BLOCK>1 </SECOND-64KB-BLOCK></FLASH><SCB_CPUID><BITS-31:24>$41</BITS-31:24><BITS-23:20>$2 </BITS-23:20><BITS-19:16>$F </BITS-19:16><BITS-15:4>$C23 </BITS-15:4><BITS-3:0>$1 </BITS-3:0></SCB_CPUID><UNIQUE-DEVICE-ID-REGISTER><BITS-95:64><HEX>$160707E2 </HEX><ASCII>....</ASCII></BITS-95:64><BITS-63:32><HEX>$13003118 </HEX><ASCII>..1.</ASCII></BITS-63:32><BITS-31:0><HEX>$046F78DC </HEX><ASCII>.ox.</ASCII></BITS-31:0></UNIQUE-DEVICE-ID-REGISTER></DEVICE>

author: techman-001
author_rank: Frequent Contributor
timestamp: February 24, 2020, 09:02:19 pm
content: Quote from: JensG on February 24, 2020, 05:02:23 pmI see you didn't select the external markings, what markings are on the chip, what does it claim to be ?

author: techman-001
author_rank: Frequent Contributor
timestamp: February 24, 2020, 09:48:57 pm
content: Quote from: JensG on February 24, 2020, 05:02:23 pmExcellentIt looks like one of these chips to me, but with a different REVID, and 128kB flashGD32F130C8T6: CPUID:0x412FC231 DevID:0x0410 RevID:0x1303GD32F150C8T6: CPUID:0x412FC231 DevID:0x0410 RevID:0x1303If this is the case then you can download the User Manual (inc USB capabilities) athttps://www.gigadevice.com/microcontroller/gd32f130c8t6/

author: JensG
author_rank: Newbie
timestamp: February 25, 2020, 08:33:55 am
content: the chip has 3 notchesstm32F103C8T6991ka 93MYS 807