Abstract
stm32 project default stack size is: 0x1000 Byte, is 4KB if we want to use more biger stack. we need to adjust the stack size, but we only know the RAM size, if we set the RAM size of stack, the MCU doesn’t work.
Referance
none
how to set stack
the max stack size is: Rotal_RAM = RAM1 + RAM2(is ram2 is none you can assign the whole RAM to RAM1(stack))
set the stack accroding to the RAM1
MAX demo with RAM2
name | size |
---|---|
Total_RAM | 0x10000(64k) |
RAM1 | 0xc000 |
RAM2 | 0x4000 |
MAX demo without RAM2
name | size |
---|---|
Total_RAM | 0x10000(64k) |
RAM1 | 0x10000 |