2024-01-18 02:30 AM
According to the STM32H7's datasheet, the M4 core shouldn't be able to boot from an SDRAM memory address (because it's outside of the range 0x00000000 to 0x3FFF0000):
However, I found out that I can actually boot the M4 core from SDRAM, if I used the alias address at 0x70000000 (which is also outside of the range) instead of 0xC0000000. So I'm wondering if this is a documentation error, or an undocumented feature/bug that we shouldn't count on ?
Thanks!
Solved! Go to Solution.
2024-01-18 07:13 AM
Hello @Ibrahim Abdalkader
The answer is next sentence. The BOOT_ADD0 / BOOT_ADD1 / BCM4_ADD0 / BCM4_ADD1 option bytes can be modified after reset in order to boot from any other boot address after next reset.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-01-18 07:13 AM
Hello @Ibrahim Abdalkader
The answer is next sentence. The BOOT_ADD0 / BOOT_ADD1 / BCM4_ADD0 / BCM4_ADD1 option bytes can be modified after reset in order to boot from any other boot address after next reset.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-01-18 09:00 AM
Hi @FBL Thank you very much for clarifying that! But I still don't understand why it can't boot from 0xC0000000 ? I tried but I can only boot from 0x70000000 after reset.
2024-01-18 09:10 AM
According to Table 6. Memory map and default device memory area attributes, you can remap to 0xD0000000 as it is considered for FMC SDRAM bank 2 in case of FMC remap. 0xC0000000 is linked to bank 1.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2024-01-18 09:33 AM
Yes but this table seems to suggest that 0x70000000 and 0xC0000000 are both the same address for SDRAM bank1 with the default mapping.
Anyway, I I checked the table you mentioned and noticed 0xC0000000 has different default memory attributes, specifically Never Execute! Maybe that's why I couldn't boot from it. I will try to make it executable with the MPU later. Thanks a lot @FBL I think all my questions are answered.