cancel
Showing results for 
Search instead for 
Did you mean: 

Memory Mapped Mode for NOR Flash and Making External Loader for STM32F769AI- W25Q01JV (Winbond W25Q01JV- QSPI NOR FLASH).

Vins
Senior

Hi Community,

I worked on project W25Q01JV (QSPI NOR FLASH) interfacing with STM32F769AI . I have fully functional project with Erase, Read and Write.

Now I am trying to do following tasks :

1) Configuring into Memory Mapped Mode.

2) Implementing an External Loader for my STM32F769AI-W25Q01JV.

I have referred some technical details to solve them, but didn't get clarity. So, to solve them I need some support from community.

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions

Memory Mapped, you're just configuring the system with the command you're using to do a Quad Read, w/32-bit addressing. You're just providing the system with a command template, and it uses that over and over within the 0x90000000 address space, it will use the parts 0 thru 0x7FFFFFF (128MB) addressing.

Once you switch into this mode, you can't use the direct commanding any more until your reset/restart the QSPI connection.

You have these in SOIC16W?

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

View solution in original post

20 REPLIES 20
Bouraoui Chemli
ST Employee

Hi,

I think this guide could help you: How to create an external QSPI loader MOOC

Bouraoui

Memory Mapped, you're just configuring the system with the command you're using to do a Quad Read, w/32-bit addressing. You're just providing the system with a command template, and it uses that over and over within the 0x90000000 address space, it will use the parts 0 thru 0x7FFFFFF (128MB) addressing.

Once you switch into this mode, you can't use the direct commanding any more until your reset/restart the QSPI connection.

You have these in SOIC16W?

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

@Community member​ Thank you for your replay.

I have another query regarding address.

0x90000000 Macronix memory's starting address.

0x00000000 Windbond memory's starting address.

Is 0x90000000 address is fixed for any/every external memories? Or it varies according to the different nor flashes? As in the case of Winbond NOR Flash.

I think according to that We should change in the dev_info.c.​

SOIC16W would be W25Q01JVSFIQ

Dual Die

PB2:AF9:CLK

PB10:AF9:NCS

PD11:AF9:D0

PD12:AF9:D1

PE2:AF9:D2

PA1:AF9:D3

https://www.winbond.com/resource-files/W25Q01JV%20SPI%20RevC%2005032021%20Plus%20dummy.pdf

https://github.com/cturvey/stm32extldr/blob/main/f7_w25q01/CLIVEONE-W25Q01_STM32F7XX-PB2-PB10-PD11-PD12-PE2-PA1.stldr

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

Ok, so the QSPI memory appears within the STM32's address space at 0x90000000, as a 256MB window, shrunk to match the "Size" shift parameter. You'll get Hard Faults outside of the decode region.

The memory devices don't know where they are within the MCU's address space, and the addresses passed to the QSPI device is ZERO based, ie the Address you pass to the COMMAND is basically (Address & 0x0FFFFFFF), you have to watch this with addresses passed via the external loader interface as ST is sometimes inconsistent, or assumes it should be 0x90000000 based. The upper bits will confuse the memory chip.

The Memory Mapped mode does this masking in hardware, either masking off the top 4-bits, or using the "Size" shift parameter you used to configure the QSPI Peripheral.

Mouser looks to have some of the W25Q01JVSFIQ, so I've ordered an handful of those, which I can fixture.

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

@Community member​ it means even though staring address of the memory is 0x00000000, I should use 0x90000000 as device's starting address?

Within the StorageInfo structure of the external loader, you should describe the base address as 0x90000000

This address is used to identify which loader to use for the subsections of your .ELF or .HEX files

com.InstructionMode = QSPI_INSTRUCTION_1_LINE;

com.Instruction = EXT_FLSH_FAST_READ_QUAD_IO_4B;

com.AddressSize = QSPI_ADDRESS_32_BITS;

com.AddressMode = QSPI_ADDRESS_4_LINES;

com.Address = Addr & 0x0FFFFFFF; // Mask to memories expectations

com.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE;

com.AlternateBytes = QSPI_ALTERNATE_BYTES_NONE;

com.AlternateBytesSize = QSPI_ALTERNATE_BYTES_NONE;

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

Thank you @Community member​ for your instantaneous responses. ​

I will work on this, any queries I will post here.

Thank you @Community member​ .​