2020-08-31 12:26 AM
Hello All
I am trying to interface External NOR FLASH (S25FL512S) to the Microcontroller STM32F746G.
1) I want to understand how to write and read data to external flash ? provide me sample code.
2)How to use memory mapped mode ? provide documentation and sample code if available.
As per my logic I create code.
please refer two attachment :
(i) flash-fun : There are available definition of flash.
(ii) flash-logic : main logic of flash code.
from the flash logic code I able to write but during debug 0x90000000 not written anything.
So,kindly correct my mistake and please provide step by step solution.
Thank you.
Regards,
Pratik
2020-08-31 08:32 AM
Hi PPanc.1,
Maybe it helps if you take a look into the firmware QSPI ReadWrite example. You probable have it already, e.g.
C:\Users\username\STM32Cube\Repository\STM32Cube_FW_F7_V1.16.0\Projects\STM32746G-Discovery\Examples\QSPI\QSPI_ReadWrite_IT\Src
Regards EJOHA
2020-08-31 09:37 AM
ST provides examples under the BSP code for some Micron and Macronix parts.
Your team will likely need to modify those based on the parts you've chosen, without a script.
The QSPI memories have data sheets explaining the commands and expectations.
The memory mapped mode requires a READ QUAD type template for the command sent to the memory, using the address present on the AHB bus.
Typically doesn't support concurrent use of Command Mode, and Memory Mapped Mode.
You'd want to Erase Blocks and Write Pages in Command Mode. The block level erase may take many seconds, a device level erase may take many minutes.
2020-09-02 10:56 PM
Thank you for suggestion.
one more thing I want to understand from External Flash Write data should I copy to Internal Flash ?
please give me a suggestion how can I copy ? Is possible using memcpy ?
Thank you.
2020-09-02 11:41 PM
Hi PPanc.1
Hi I do not see any reason to copy from External flash to Internal flash.
As mentioned by clive1 (NFA Crew), I noticed that the firmware package for F7 contains QSPI BSP code for the STM32746G-Discovery board. Even if this example does not contain flash write maybe it can be used as an example on how to work with the QSPI flash.
Regards EJOHA
2020-09-03 02:09 AM
Not sure I understand the question.
The write process on each memory is usually a little more involved.
For reading, to say RAM, yes there are modes where you can memcpy() out content, or read it in place.