#88104·zephyr

SRAM Parity check on STM32G0B1

Author: emwhfmCreated Apr 3, 2025Updated Sep 18, 2026
Labelsplatform: STM32

We want to enable SRAM parity check on a STM32G0B1. This however requires an initialization of the complete SRAM really early to update the parity bits.

Something like this firstly in z_prep_c():

cpp
for (uint32_t* ptr = (uint32_t*)CONFIG_SRAM_BASE_ADDRESS; 
     ptr < (uint32_t*)(CONFIG_SRAM_BASE_ADDRESS + (CONFIG_SRAM_SIZE * 1024));
     ++ptr)
{
    *ptr = 0;
}

Source: zephyrproject-rtos/zephyr