2020-12-14 01:36 PM
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
2020-12-14 11:02 PM
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 ...
2020-12-28 04:01 PM
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.