Large array causing hard fault when debugging
Hi,
In my program (running on STM32F446RE, with 512 KB flash and 128 KB SRAM) I defined two big arrays:
int main(void)
{
/* USER CODE BEGIN 1 */
int16_t data_in[64000];
int16_t audio_buffer[16000];
The code can run normally when the data_in array is not there. However, when the variable data_in is defined, the program will just encounter hard fault and exit abnormally.
Since these variables will be changed throughout the program I can't define them as constants. May I ask what should I do in order to fix this problem?
Thank you.