cancel
Showing results for 
Search instead for 
Did you mean: 

Requesting Example code-NOR flash(S25FL512S) interfacing for STM32F746G

PPanc.1
Associate II

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

5 REPLIES 5
EJOHA
Senior

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

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.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
PPanc.1
Associate II

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.

EJOHA
Senior

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

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.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..