cancel
Showing results for 
Search instead for 
Did you mean: 

HardFault_Handler, array initialization (STM32f103CBTx)

Denys1
Associate

Hello everyone,

MCU - STM32f103CBTx, Flash - 128Kbytes, RAM - 20kBytes. 

I use MDK-ARM V5 (Keil uVision 5) and compiler is - default compiler version 5.

In my program I try to initialize float array with length of 240, ( float array[240] = {0}; ) and that's it.

But, during the execution of HAL_Init(), program goes to HardFault_Handler and stay there in an infinite loop. And Keil uVision 5 command console says - "Cannot access Memory". I don't understand why it is happening because a day ago I was able to create float array with a length of 1000 and everything was working.0690X000008AkQhQAK.png0690X000008AkQcQAK.png0690X000008AkQXQA0.png

1 REPLY 1

Local/auto variables will need an adequate stack. Define size is startup_stm32f10x.s

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..