STM32F103ZET6 Board hack

Post here first, or if you can't find a relevant section!
sigi
Posts: 57
Joined: Mon Sep 28, 2020 3:17 pm

STM32F103ZET6 Board hack

Post by sigi »

Hi!!!
it is possible to buy this board:
https://www.aliexpress.com/item/3274157 ... cOLzz&mp=1

and replace the MCU with a 1Mb STM32F103ZGT6 chip? (with the same form factor LQFP144)

Supposing that it can be done successfully, what changes are needed to add support for that memory on the arduino STM32 core ? ( as I see there are only support for STM32F103ZET6 (512kB) )

Im just searching for a 1Mb variant with lots of pins and compatible with the STM32F103 core.
stevestrong
Posts: 502
Joined: Fri Dec 27, 2019 4:53 pm
Answers: 8
Location: Munich, Germany
Contact:

Re: STM32F103ZET6 Board hack

Post by stevestrong »

Which STM32F103 core? Arduino_STM32 (Libmaple) or STM32duino (STM official core)?
sheepdoll
Posts: 32
Joined: Fri Dec 20, 2019 6:47 pm

Re: STM32F103ZET6 Board hack

Post by sheepdoll »

I swapped out an STM32F429 for a pin equivelent STM32F103 on one of the discovery modules (and all of my prototypes.) Stripped a bunch of the peripherals off the discovery. The whole reason was to get more memory.

The cube tool has a good product selector section to see what footprint is. STM provides the Gerber artwork for the Discovery boarads, which is a good way to start a new layout. If one looks at the Nucleo stuff, the boards are the same for a given footprint. There are a lot of straps on the Nucleos to configure the options.

It helps that I have access to an IR reflow oven. One does have to check that the existing sockets and plastic parts can withstand the reflow. Otherwise you have to strip and replace then when they turn into shriveled up raisins.
sigi
Posts: 57
Joined: Mon Sep 28, 2020 3:17 pm

Re: STM32F103ZET6 Board hack

Post by sigi »

stevestrong wrote: Sat Feb 27, 2021 8:17 am Which STM32F103 core? Arduino_STM32 (Libmaple) or STM32duino (STM official core)?
Arduino_STM32
stevestrong
Posts: 502
Joined: Fri Dec 27, 2019 4:53 pm
Answers: 8
Location: Munich, Germany
Contact:

Re: STM32F103ZET6 Board hack

Post by stevestrong »

If only the flash and RAM size is the difference, you take the ld file for ZE variant and copy it as ZG variant in which you adapt the RAM and ROM LENGTH parameters.
Then edit the boards.txt file by copying this section to the next following lines in which you change the name, the parameters according to your variant, and the new linker ld file you generated.
Finally, you should be able to select in Arduino menu the new ZG variant (close and re-open the IDE if already opened).
ag123
Posts: 1655
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: STM32F103ZET6 Board hack

Post by ag123 »

for the stm32 z series, normally there is fsmc
https://www.st.com/resource/en/applicat ... ronics.pdf
so i'd guess if you are willing to go the distance, you can try getting chips like IS61WV51216BLL
http://www.issi.com/WW/pdf/61-64WV51216.pdf
and add like 1 MB sram

if you were to search around aliexpress
https://www.aliexpress.com/wholesale?ca ... 32f407zgt6
you may find some of the stm32f407zg boards has solder pads for that IS61WV51216BLL at the bottom
i've got one of them but i've not literally tried using the sram. e.g.
https://www.aliexpress.com/item/4001062616584.html

the appnote also mentioned nand flash usage with fsmc
a main trouble with that is the multitude of pins used hence higher wiring effort
i think the f4 series some of them have fmc which can use drams which gives one access to megabytes of dram. i think some of the f4 discovery boards has an additional 8mb on board

if the storage requirement is mainly data rather than code, it is possible to use spi flash and a much better solution is sd cards.
with sd cards you get access gigabytes of storage, from mcus as 'small' as a stm32f103c8
viewtopic.php?f=7&t=911
sigi
Posts: 57
Joined: Mon Sep 28, 2020 3:17 pm

Re: STM32F103ZET6 Board hack

Post by sigi »

stevestrong wrote: Sun Feb 28, 2021 12:05 pm If only the flash and RAM size is the difference, you take the ld file for ZE variant and copy it as ZG variant in which you adapt the RAM and ROM LENGTH parameters.
Then edit the boards.txt file by copying this section to the next following lines in which you change the name, the parameters according to your variant, and the new linker ld file you generated.
Finally, you should be able to select in Arduino menu the new ZG variant (close and re-open the IDE if already opened).
Thanks! It compiles BUT gives error on compile, so by reading the message, I Edit the file stm32.h located in:
C:\Users\Sigi\AppData\Local\Arduino15\packages\stm32duino\hardware\STM32F1\2021.2.22\system\libmaple\stm32f1\include\series

Now it compiles and looks like this:
//***************************************************************************
#elif defined(MCU_STM32F103ZC)
# define STM32_F1_LINE STM32_F1_LINE_PERFORMANCE
# define STM32_NR_GPIO_PORTS 7
# define STM32_SRAM_END ((void*)0x2000C000)
# define STM32_HIGH_DENSITY

#elif defined(MCU_STM32F103ZD) || defined(MCU_STM32F103ZE)
# define STM32_F1_LINE STM32_F1_LINE_PERFORMANCE
# define STM32_NR_GPIO_PORTS 7
# define STM32_SRAM_END ((void*)0x20010000)
# define STM32_HIGH_DENSITY

#elif defined(MCU_STM32F103ZF) || defined(MCU_STM32F103ZG)
# define STM32_F1_LINE STM32_F1_LINE_PERFORMANCE
# define STM32_NR_GPIO_PORTS 7
# define STM32_SRAM_END ((void*)0x20010000) <----------------------------?????????????????
# define STM32_HIGH_DENSITY
//***************************************************************************

Have no idea what value on the STM32_SRAM_END section for the "NEW" ZF and ZG MCUs (with the same 96k of RAM). I look on the datasheet but the info is not there.
sigi
Posts: 57
Joined: Mon Sep 28, 2020 3:17 pm

Re: STM32F103ZET6 Board hack

Post by sigi »

ag123 wrote: Sun Feb 28, 2021 3:24 pm for the stm32 z series, normally there is fsmc
https://www.st.com/resource/en/applicat ... ronics.pdf
so i'd guess if you are willing to go the distance, you can try getting chips like IS61WV51216BLL
http://www.issi.com/WW/pdf/61-64WV51216.pdf
and add like 1 MB sram

if you were to search around aliexpress
https://www.aliexpress.com/wholesale?ca ... 32f407zgt6
you may find some of the stm32f407zg boards has solder pads for that IS61WV51216BLL at the bottom
i've got one of them but i've not literally tried using the sram. e.g.
https://www.aliexpress.com/item/4001062616584.html

the appnote also mentioned nand flash usage with fsmc
a main trouble with that is the multitude of pins used hence higher wiring effort
i think the f4 series some of them have fmc which can use drams which gives one access to megabytes of dram. i think some of the f4 discovery boards has an additional 8mb on board

if the storage requirement is mainly data rather than code, it is possible to use spi flash and a much better solution is sd cards.
with sd cards you get access gigabytes of storage, from mcus as 'small' as a stm32f103c8
viewtopic.php?f=7&t=911
F407 is not the same as F103, so the libraries will not work.
ag123
Posts: 1655
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: STM32F103ZET6 Board hack

Post by ag123 »

it seemed that 96k sram is a single block 96k is 0x18000 (hex).
so i'd guess you may like to try 0x20018000
sigi
Posts: 57
Joined: Mon Sep 28, 2020 3:17 pm

Re: STM32F103ZET6 Board hack

Post by sigi »

ag123 wrote: Sun Feb 28, 2021 4:13 pm it seemed that 96k sram is a single block 96k is 0x18000 (hex).
so i'd guess you may like to try 0x20018000
thanks it is quite obvious now as usual. :D Now I just need the hacked board! :roll:
Post Reply

Return to “General discussion”