2022-03-10 02:25 AM
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.
Solved! Go to Solution.
2022-03-10 09:39 AM
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?
2022-03-10 06:39 AM
2022-03-10 09:39 AM
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?
2022-03-10 10:09 AM
@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.
2022-03-10 10:10 AM
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
2022-03-10 10:28 AM
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.
2022-03-10 10:39 AM
@Community member it means even though staring address of the memory is 0x00000000, I should use 0x90000000 as device's starting address?
2022-03-10 10:53 AM
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;
2022-03-10 10:58 AM
Thank you @Community member for your instantaneous responses.
2022-03-10 11:04 AM
I will work on this, any queries I will post here.
Thank you @Community member .