Where to get 128k flash bluepill?

Generic boards that are not Maple or Maple mini clones, and don't contain the additional USB reset hardware
Post Reply
profdc9
Posts: 50
Joined: Mon Jun 11, 2018 11:20 am

Where to get 128k flash bluepill?

Post by profdc9 » Sun Aug 12, 2018 9:52 pm

I just bought a couple of Bluepills on ebay and they only had the 64k of flash rather than the 128k of flash. Does anyone know where to get (inexpensively preferred) Bluepills that are 128k flash?

Thanks,

Dan

User avatar
RogerClark
Posts: 8416
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Where to get 128k flash bluepill?

Post by RogerClark » Sun Aug 12, 2018 10:16 pm

why do you think they only have 64k flash?

It’s quite rare to encounter a BluePill ( or any other board using a STM32F193C8 ) that really, only has 64k Flash.

STLink and other programmers normally just read the device ID register and look up the Flash size.

I am not even sure if STLink let’s you flash the area above 64k on a STM32F103C8.

This does not however mean the chip only has 64k.

dannyf
Posts: 330
Joined: Wed May 11, 2016 4:29 pm

Re: Where to get 128k flash bluepill?

Post by dannyf » Mon Aug 13, 2018 12:21 am

the cb variant is quite rare these days, but it is pin-compatible with the c8 variant which is very common.

so you can either put a cb chip on a board designed for c8, and have a guaranteed 128kb. or you can just use a c8 chip as a cb variant - many of them indeed have 128kb flash onboard - but run the risk of ST not guaranteeing such.

ag123
Posts: 1322
Joined: Thu Jul 21, 2016 4:24 pm

Re: Where to get 128k flash bluepill?

Post by ag123 » Mon Aug 13, 2018 7:27 am

check out this thread What STM32 board should you buy
viewtopic.php?f=55&t=2465

those maple mini clones tends to cost a dollar more at least, but they tend to come with a stm32f103cBt6
https://www.aliexpress.com/wholesale?ca ... maple+mini
nevertheless, do check it with the dealers that you are buying from as the c8 and cb are pretty much pin for pin compatible
and many of those ads do not specifically confirm that you'd get a CB rather than a C8

one should also visit the stm's web site as after all buying the board you are really basically buying stm's mcus
https://www.st.com/en/microcontrollers/stm32f103cb.html
https://www.st.com/en/microcontrollers/stm32f103c8.html

the specs, much info are 'all out there'

profdc9
Posts: 50
Joined: Mon Jun 11, 2018 11:20 am

Re: Where to get 128k flash bluepill?

Post by profdc9 » Tue Aug 14, 2018 1:40 pm

I believe the CPUs I have are 64k because when I plug it into STLINK to flash the USB update firmware, they are reported as 64 k.

I've already designed my board for the bluepill, so I would have to rebuild it to use the Maple. I suppose I will have to order the chip and build my own to make sure if I really want 128k parts.

Dan

User avatar
madias
Posts: 1198
Joined: Mon Apr 27, 2015 11:26 am
Location: Vienna, Austria

Re: Where to get 128k flash bluepill?

Post by madias » Tue Aug 14, 2018 3:24 pm

STLink *will* report 64k, everytime. - but you can select it in the Arduino IDE -> generic STM32C... -> Variant -> STM32CB.... (20kb,128kb...)
Try out this:
viewtopic.php?f=28&t=3854

fredbox
Posts: 211
Joined: Tue Jul 07, 2015 4:44 pm

Re: Where to get 128k flash bluepill?

Post by fredbox » Tue Aug 14, 2018 8:52 pm

All my blue and black pills report 128k.

Try this:
Hook up a USB/serial adapter to PA9 and PA10.
Set Boot0=1 and Boot1=0.
Run stm32flash from the tools folder:

Code: Select all

$ stm32flash /dev/ttyUSB0
stm32flash Arduino_STM32_0.9
http://github.com/rogerclarkmelbourne/arduino_stm32
Interface serial_posix: 57600 8E1
Version      : 0x22
Option 1     : 0x00
Option 2     : 0x00
Device ID    : 0x0410 (Medium-density)
- RAM        : 20KiB  (512b reserved by bootloader)
- Flash      : 128KiB (sector size: 4x1024)
- Option RAM : 16b
- System RAM : 2KiB

profdc9
Posts: 50
Joined: Mon Jun 11, 2018 11:20 am

Re: Where to get 128k flash bluepill?

Post by profdc9 » Wed Aug 15, 2018 3:21 am

Ok I tried Pito's Arduino's sketch, and after tweaking the number of repeated lines, it does work with 128k.

I think what confused me is that some of the boards I have actually report 128k in STLINK. I think it may be because they are actually STM32F103CBT6 rather than STM32F103C8T6 (note the "B" rather than the "8").

I wonder if the 8's are just rejects of the B's and nowadays yields are sufficiently good that practically all 8's are B's that work.

Thanks for the tip.

Dan

User avatar
Kelvin
Posts: 5
Joined: Fri Nov 16, 2018 11:44 am
Location: London U.K.
Contact:

Re: Where to get 128k flash bluepill?

Post by Kelvin » Tue Nov 20, 2018 11:05 pm

I have just tested the 128 KB memory on a Blue Pill. I made a sixteen-byte file called end.bin, containing the text MEMORY ENDS HERE. I used a batch file to write it to the last line in 128 KB memory:-

stm32flash.exe -w end.bin -S 0x8001fff0 COM3
stm32flash.exe -r test.bin COM3
pause

test.bin is 128 KB and you can view the message on the last line. I used the Mitac free hex editor to read and write the binary files.

Post Reply