cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with External addressable flash

Pouya Rostam
Associate II

Hello folks,

I am using a STM32F469i-disco board and trying to read the stored variable from the on-board flash. I did use BSP package to init the QSPI and set it to memory mapped mode. Now, I am facing a weird situation.

printf("%x\n", (EXTERNAL[0])); -> print the expected value (0xb3)

int i = 0;

printf("%x\n", (EXTERNAL[i])); -> print some "random" number (0x99)

Is there anything here that I am missing?

Thanks

2 REPLIES 2
Andreas Bolsch
Lead II

Sorry, but my crystal ball is currently at the repair shop 😉

So, if you expect somebody to assist you, please be so kind to describe your setup and your observations *precisely*. If you don't want to invest some of your time to accomplish this ...

Pouya Rostam
Associate II

Sorry if I did not explain my issue well enough.

Anyway, I investigated the issue further and noticed that compiler replaces "EXTERNAL[0]" in "printf("%x\n", (EXTERNAL[0]))" with its value. Now I know that I cannot really read from the on-board flash in the memory-mapped mode. That's why the second printf produces random non-sense numbers.