How to properly enable all RAMs on a single core STM32H7?
Still learning H7 so apologize for a silly question.
I want to use all Dx RAM parts on a single core STM32H743: D1, D2, D3.
Now, in system_stm32h7xx.c , SystemInit there's following code:
#if defined (DATA_IN_D2_SRAM)
/* in case of initialized data in D2 SRAM , enable the D2 SRAM clock */
RCC->AHB2ENR |= (RCC_AHB2ENR_D2SRAM1EN | RCC_AHB2ENR_D2SRAM2EN |
RCC_AHB2ENR_D2SRAM3EN);
#endif /* DATA_IN_D2_SRAM */
RM0433 says about RCC_AHB2ENR_D2SRAM1EN "When set, this bit indicates that SRAM1 is allocated bu the CPU", and same about SRAM2EN and SRAM3EN. But wait, SRAM1 (does it mean D1_SRAM aka AXI_SRAM?) already is accessible by the CPU? And, if I have initialized data in D2 SRAM, is it too late to enable it, because initialization of data is in the .s startup file, before SystemInit is called?
By testing it looks like D2 and D3 RAM can be read and written by the CPU even if RCC->AHB2ENR is 0.
The question is, do I need to uncomment these lines in SystemInit? Are they actually intended for multi-core H7 MCUs? Can anything bad happen if I leave RCC->AHB2ENR as 0?
Thanks in advance,
-- pa