cancel
Showing results for 
Search instead for 
Did you mean: 

Weird memory access issue on custom STM32F767VIT board

rdb
Associate

I’ve attached the project folder in .7z file,

I am encountering a memory access issue in my application, which runs on Azure RTOS on a custom STM32F767VIT6‑based target board. The application receives JPEG images from an MQTT broker via the EC200U modem, using USART on the board.

The problem arises when I declare a global array of size 180 KB to store the image. Even though I initialize this array with valid non‑zero content (JPEG image data in hex), the debugger consistently shows all zeros when I attempt to read it.

Interestingly, when I reduce the array size to 100 KB, the behavior is normal — the data is correctly written and read. I am using the ST‑Link 2.0 debugger from STMicroelectronics, and the project is built in STM32CubeIDE.

Since my JPEG images can be as large as 180 KB, I need to resolve this memory limitation. Could you provide detailed guidance on the root cause of this issue and possible solutions? I have attached my workspace in .7z format for reference.

I’ve also noticed that IP address acquisition occasionally fails, and I’d like to confirm whether this is related to the way I’ve structured the project.

Thanks & Regards,

1 REPLY 1
MM..1
Chief III

Primary you write to buffer indirect then place volatile to declaration, and your issue is MPU and maybe too debuger issue with read over DTCM vs SRAM1 part of address space. Better is manage in linker sections ... Seems colision is MPU

/** Initializes and configures the Region and the memory to be protected
  */
  MPU_InitStruct.Number = MPU_REGION_NUMBER2;
  MPU_InitStruct.BaseAddress = 0x20020000;
  MPU_InitStruct.Size = MPU_REGION_SIZE_64KB;
  MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0;