m - Menu; STM32F103R8 Test Kit
i - Device ID
b - Device Reported Flash Size in Bytes
t - TEST second 64kB Flash Memory block: 0x10000 - 0x1FFFF
d - Dump second 64kB Flash Memory block: 0x10000 - 0x1FFFF
e - Dump first 64kB Flash Memory block: 0x00000 - 0x10000
a - Author
l - License
q - Quit
Testing 64kB Flash block: 0x10000 - 0x1FFFF
Erasing
Flash with 1010101010101010 (0xAA)
Testing for 0xAA - OK
Erasing
Flash with 0101010101010101 (0x55)
Testing for 0x55 - OK
Erasing
~~~~~ ALL TESTS PASSED ~~~~~
have you found a real 64kb C8 ? out of 20 chips I tried all were 128kb
stm32id
Die xy coords: 107806545
Wafer Number: 73
Lot_num ascii encoded [23:0]: 0x00485478 | H T x
Lot_num ascii encoded [55:24]: 0x67244344 | g $ C D
Flash Size Register = 65536 Bytes
Testing 64kB Flash block: 0x10000 - 0x1FFFF
Erasing
Flash with 1010101010101010 (0xAA)
Testing for 0xAA - OK
Erasing
Flash with 0101010101010101 (0x55)
Testing for 0x55 - OK
Erasing
~~~~~ ALL TESTS PASSED ~~~~~
stm32id
Die xy coords: 16917299
Wafer Number: 50
Lot_num ascii encoded [23:0]: 0x004D3712 | M 7 .
Lot_num ascii encoded [55:24]: 0x004E4B43 | . N K C
Flash Size Register = 65536 Bytes
Testing 64kB Flash block: 0x10000 - 0x1FFFF
Erasing
FAILTEST: $10000 Data = $8C
FAILTEST: $10001 Data = $03
... all the way to
FAILTEST: $1CDE5 Data = $BD
FAILTEST: $1CDE6 Data = $00
FAILTEST: $1CDE7 Data = $00
blank check FAILTEST
It looks like the binary I just flashed. Apparently this chip reads the second 64K from the first.
Did you make this bin in FORTH ?
I am using minicom on a Raspberry PI. First thing is to change the serial port from /dev/ttyUSB0 to /dev/ttyACM0.
Testing a CPU marked STM32F103C8T6:Code: [Select]stm32id
Die xy coords: 107806545
Wafer Number: 73
Lot_num ascii encoded [23:0]: 0x00485478 | H T x
Lot_num ascii encoded [55:24]: 0x67244344 | g $ C D
Flash Size Register = 65536 Bytes
Testing 64kB Flash block: 0x10000 - 0x1FFFF
Erasing
Flash with 1010101010101010 (0xAA)
Testing for 0xAA - OK
Erasing
Flash with 0101010101010101 (0x55)
Testing for 0x55 - OK
Erasing
~~~~~ ALL TESTS PASSED ~~~~~
My first test, though was accidentally a CKS CS32F103C8T6 that an ebay seller sold as the ST part.Code: [Select]stm32id
It looks like the binary I just flashed. Apparently this chip reads the second 64K from the first.
Die xy coords: 16917299
Wafer Number: 50
Lot_num ascii encoded [23:0]: 0x004D3712 | M 7 .
Lot_num ascii encoded [55:24]: 0x004E4B43 | . N K C
Flash Size Register = 65536 Bytes
Testing 64kB Flash block: 0x10000 - 0x1FFFF
Erasing
FAILTEST: $10000 Data = $8C
FAILTEST: $10001 Data = $03
... all the way to
FAILTEST: $1CDE5 Data = $BD
FAILTEST: $1CDE6 Data = $00
FAILTEST: $1CDE7 Data = $00
blank check FAILTEST
Did you enable the Minicom log then press "d" to generate a dump of the binary data at 0x10000 - 0x1FFFF ?
QuoteDid you enable the Minicom log then press "d" to generate a dump of the binary data at 0x10000 - 0x1FFFF ?Yes. At the end, I saw the GPL text and some strings from your test code.
@techman-001
Nice test
And apparently "One bites the dust".
I was under the impression, that even those CKS had 2 x 64K.
Now to avoid those bluepill's on Ali/*bay
Thnx
/Bingo
stm32id
Die xy coords: 16985357
Wafer Number: 45
Lot_num ascii encoded [23:0]: 0x004D3812 | M 8 .
Lot_num ascii encoded [55:24]: 0x004E4B43 | . N K C
Flash Size Register = 131072 Bytes
Testing 64kB Flash block: 0x10000 - 0x1FFFF
Erasing
Flash with 1010101010101010 (0xAA)
Testing for 0xAA - OK
Erasing
Flash with 0101010101010101 (0x55)
Testing for 0x55 - OK
Erasing
~~~~~ ALL TESTS PASSED ~~~~~
Mr.Porter,
Reporting my BluePill, the one with the printed "RESRT" label for the RESET button.
From this thread -> Cheap Bluepill, very likely it has fake STM32 right ?
Using your latest STM32F103R8 Test Kit v1.2 24Dec2019 version.
Result from "i" command :Code: [Select]stm32id
Die xy coords: 16985357
Wafer Number: 45
Lot_num ascii encoded [23:0]: 0x004D3812 | M 8 .
Lot_num ascii encoded [55:24]: 0x004E4B43 | . N K C
Result from "b" command :Code: [Select]Flash Size Register = 131072 Bytes
Result from "t" command :Code: [Select]Testing 64kB Flash block: 0x10000 - 0x1FFFF
Erasing
Flash with 1010101010101010 (0xAA)
Testing for 0xAA - OK
Erasing
Flash with 0101010101010101 (0x55)
Testing for 0x55 - OK
Erasing
~~~~~ ALL TESTS PASSED ~~~~~
The interesting comparison when reading the "Lot" number in ASCII form :
Your others CKS string
M5.
.NK1
While mine has
M8.
.NKC
Newer CKS revision maybe ?
Also remember "F" character at the label position, as its printed at the 1st line, instead of 2nd line.
PS : Btw, regarding my report & photos, feel free to use it as you want, like for your blog.
Ah yes, the position of the F could well be a clue the chip is fake.
Hi All,
Announcing a bootable 52.6kB diagnostic test kit binary for the STM32F103C8 such as used in the "Blue Pill Board". The size is under 64kB so that it can be flashed by OpenOCD to a MCU claiming only 64kB of Flash in the "Flash size register".
The purpose of this kit is to physically test the "hidden" 64kB second Flash block present on many of these chips and determine if it exists and if it is reliable. It does this by flashing all the bits from one to zero and back again.
Usage
--------
1. Flash the STM32F103C8-DIAGNOSTICS.bin image to your board with OpenOCD or whatever you normally use.
2. Plug in a USB cable to the “Blue Pill” board and run a serial terminal program on your PC. This will also power the board.
3. Enter “?” at the prompt to obtain the menu.
Menu
-------
Enter ? for the menuCode: [Select]m - Menu; STM32F103R8 Test Kit
i - Device ID
b - Device Reported Flash Size in Bytes
t - TEST second 64kB Flash Memory block: 0x10000 - 0x1FFFF
d - Dump second 64kB Flash Memory block: 0x10000 - 0x1FFFF
e - Dump first 64kB Flash Memory block: 0x00000 - 0x10000
a - Author
l - License
q - Quit
will it be possible to compile a version with PB9 active?
It is needed to enable the USB port on Maple Mini clones: https://stm32-base.org/boards/STM32F103C8T6-Maple-Mini-Clone.html
will it be possible to compile a version with PB9 active?
It is needed to enable the USB port on Maple Mini clones: https://stm32-base.org/boards/STM32F103C8T6-Maple-Mini-Clone.html
Absolutely, great idea!
I'll enable USB for the Blue Pill, Olimex-P103 and the Maple-Mini, all at the same time on the new STM32F103C8 Diagnostic V2.
Different Firmware won't be needed.
Thanks
will it be possible to compile a version with PB9 active?
It is needed to enable the USB port on Maple Mini clones: https://stm32-base.org/boards/STM32F103C8T6-Maple-Mini-Clone.html
Absolutely, great idea!
I'll enable USB for the Blue Pill, Olimex-P103 and the Maple-Mini, all at the same time on the new STM32F103C8 Diagnostic V2.
Different Firmware won't be needed.
Thanks
Could you also include PC13, as you did on my custom build?