Forum Discussion
Hi Jiayi_H_Intel,
Regarding the sf cmd in order to write to QSPI flash, need to take note that you will required to perform a sf erase first before you can write into it.
example:
sf erase 0 0x200000
// Erase 2MB from QSPI offset 0x0
// Note: If erase size is less than QSPI Flash page size, u-boot reports erase error
Before running any sf cmd, you will need to execute sf probe first.
As for sf write/read cmd:
sf write will be writting the content of the memory location specified in the cmd into QSPI flash.
sf read will be reading the data from QSPI flash into the memory location specified in the cmd.
You can use U-boot md cmd to check the changes in the memory location that you specified when performing sf write/read cmd.
U-Boot read command can be used to see what is programmed in to QSPI memory.
Thanks.
Regards,
Aik Eu
- aikeu3 years ago
Regular Contributor
Example of working as below:
- Jiayi_H_Intel3 years ago
Occasional Contributor
Hi Aik Eu,
Thanks for your reply. So in conclusion, the only way to access qspi flash is through sf cmd in boot stage. The function of sf cmd is to move data between flash and memory. And it is not allowed to access flash from FPGA side by F2H port. Is that correct?
And much thanks for your help.