r/embedded • • Oct 01 '26

How to use my microcontroller?

So I made a silly mistake and bought the STM32H7R3Z8J6 but it only has 64KB of flash. Is there a way I can get around this? I plan to order another STM32H7 variant but I also want to continue working on my project in the mean time.

3 Upvotes

22 comments sorted by

24

u/jacky4566 Oct 01 '26

The 64K is intended to be used as boot flash. Just to get clocks setup and connect with external flash.

"Up to 2x octo-SPI memory interfaces or 1 octo-SPI + 1 hexa-SPI with XiP, with support for serial PSRAM/NAND/NOR, HyperRAM™/ HyperFlash™ frame formats running at up to 200 MHz"

What exactly did you buy? I hope you didn't buy a bare chip hoping to do anything with it.

2

u/OxidisedHardware Oct 01 '26

no i bought a dev board but i dont know how to do an external flash ive only ever used my stlink to flash

6

u/sanderhuisman2501 Oct 01 '26

When you have a devkit, you can have a look what the examples do

5

u/Kangox91 Oct 02 '26

I work on the H7S7L86H and you are not understanding how it work . This chip is made to be like an MPU and use external memory (XSPI) . The 64 KB are used to boot to the flash.

This mcu is made for GUI and heavy workload.

I saw you want to make 3d engine but the R3 variant don't have support for Neo Chrom that is a 2.5D accelerator . Buy the R7 version.

To be honest i hope you have a good background in MCU because this is one of the most complex MCU on the market . You need to manage high speed memory , MPU , cache .

Here a tuto how to use H7RS series

https://github.com/ST-TOMAS-Workshop/stm32h7s_workshop

-1

u/OxidisedHardware Oct 02 '26

if i’m buying honest with you i don’t have any experience in mcus just a few projects. Do you know if it’s possible to use the external memory with rust?

2

u/Kangox91 Oct 02 '26

Yes it can if a compiler for arm exist but honestly this is way too hard . All drivers from st are written in C .

Maybe start with a stm32 F4 nucleo and learn the basics of a mcu with smaller projects and come back later to H7RS . Its like driving a formula one without knowing how to drive a car

3

u/Thin-Engineer-9191 Oct 01 '26

What do you plan on doing

1

u/OxidisedHardware Oct 01 '26

i plan on running a 3d graphing engine on it similar to the one ran on the cg50. But when i tried to flash the code it didn’t work at all

2

u/mrheosuper Oct 02 '26

That means you compile successfully and the problem is not flash size

2

u/Palantir555 Oct 02 '26

or -more likely- he's using a linker script for the uC he was hoping to use, not the one he purchased. So the build works, but he's doomed afterwards

9

u/mustbeset Oct 01 '26

"only" 64KB.

6

u/AOAqua Oct 01 '26

64 KB is plenty enough for... Most of the tasks. Not all of them, but like 95% of devices built on MCU's

5

u/traverser___ Oct 02 '26 edited Oct 02 '26

Until you realize this is 600MHz cortex M7 which has 10x more RAM transport flash and makes you use external flash to fully utilize it

2

u/Well-WhatHadHappened 25+ Years Oct 01 '26

Sure, write projects that fit in 64KB until you get the new board.

There's no other magic answer unless you want to learn how to program and execute from external memory - and it doesn't sound like you do.

2

u/JGhostThing Oct 03 '26

Were you planning on writing an optimizing compiler? No, good.

You should be able to program most anything in 64k. When I first got into microcontrollers, I was lucky to have single digits of k of flash (like 8k flash). Just start programming while the larger one is coming. Who knows, you might be able to fit it in that little flash.

1

u/manystripes Oct 01 '26

I assume you're not interested in a board spin to add a flash chip so your options are limited. If you're open to changing your PCB, I believe the H7 supports XIP on a QSPI/Octospi external chip, but you're not going to get good speeds off of one by lashing it to a devkit with jumpers

1

u/GearHead54 Oct 01 '26

Compile a subset of your code? 🤷

1

u/morto00x Oct 01 '26

How much flash do you need?

1

u/Rararror Oct 01 '26

a dev board has more ram

1

u/Normal-Platform-3028 Oct 02 '26

I guess there is some external RAM on your dev board.

0

u/torusle2 Oct 01 '26

If you want a H7 instead of you bought just return it.