2021-08-24 10:51 PM
MEMORY
{
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 320K
FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 1024K
QUADSPI (rx) : ORIGIN = 0x90000000, LENGTH = 16M
SDRAM (xrw) : ORIGIN = 0xC0000000, LENGTH = 16M
}
.sdram_section :
{
. = ALIGN(4);
*(.sdram_section)
*(.gnu.linkonce.r.*)
. = ALIGN(4);
} >SDRAM
.qspi_section :
{
. = ALIGN(4);
_sqspi = .; /* create a global symbol at data start */
*(.qspi_section)
*(.image_section)
*(.font_section)
*(.gnu.linkonce.r.*)
. = ALIGN(4);
_eqspi = .; /* define a global symbol at data end */
} >QUADSPI
I am changed the my code like this:
.sdram_section :
{
. = ALIGN(4);
*(.sdram_section)
*(.gnu.linkonce.r.*)
. = ALIGN(4);
} >SDRAM
_siqspi = LOADADDR(.qspi_section);
.qspi_section :
{
. = ALIGN(4);
_sqspi = .; /* create a global symbol at data start */
*(.qspi_section)
*(.image_section)
*(.font_section)
*(.gnu.linkonce.r.*)
. = ALIGN(4);
_eqspi = .; /* define a global symbol at data end */
} >QUADSPI AT> SDRAM
And add some lines in Startup file:
/* Copy the Qspi data to SDRAM*/
movs r1, #0
b LoopCopyDataSdram
CopyDataSdram:
ldr r3, =_siqspi
ldr r3, [r3, r1]
str r3, [r0, r1]
adds r1, r1, #4
LoopCopyDataSdram:
ldr r0, =_sqspi
ldr r3, =_eqspi
adds r2, r0, r1
cmp r2, r3
bcc CopyDataSdram
Code build successfully but I have face this error:
10:42:31 : Read progress:
10:42:33 : Error: Data mismatch found at address 0xC0000000 (byte = 0x00 instead of 0xFF)
10:42:33 : Error: Download verification failed
How to solve this error ???:\
Solved! Go to Solution.
2021-09-02 12:18 AM
Hello @N Sornakumar ,
What is the option byte boot address? It may be the cause of this problem is on the configuration.
Try to upgrade the STLink Firmware and make sure to use the latest Cubeprogammer release.
Check this post it may helps you.
When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.
Imen
2021-09-02 12:18 AM
Hello @N Sornakumar ,
What is the option byte boot address? It may be the cause of this problem is on the configuration.
Try to upgrade the STLink Firmware and make sure to use the latest Cubeprogammer release.
Check this post it may helps you.
When your question is answered, please close this topic by choosing Select as Best. This will help other users find that answer faster.
Imen