cancel
Showing results for 
Search instead for 
Did you mean: 

Use STM32F446 with s25fl Memory Mapped

IlConte
Associate III

I'm looking for an example for STM32F446 to use a S25FL64 QSPI with Memory Mapped configuration.

I would like an example to be able to see the QSPI as address memory .

Thanks all

1 ACCEPTED SOLUTION

Accepted Solutions

0x90000000 is define architecturally, basically the top level address decoder recognizes the 0x9 in the high nibble of the address.

There might be a bank/swap mechanism to get to to 0xA0000000, read through the Reference Manual

The linker file is where you direct it's use/placement of memories. You can describe a 8MB region at 0x90000000, and then direct content into there.

I might break your code into pieces, a loader that brings up the clock, pins, external memories, etc. and then transfers control. Your app code can then have a more complex mix of internal/external memory. The architecture doesn't provide caching, so external will be slower, so use for large blobs of data, or non-critical code.

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

6 REPLIES 6
ChahinezC
Lead

Hello @IlConte​,

You can find the "QSPI_MemoryMapped" example on the STM32446E_EVAL within the STM32CubeF4 examples. You can download it from the ST official website or find it under the GitHub repository.

Regards,

Chahinez.

As @ChahinezC​ indicated this is pretty basic and consistent stuff.

Below 16MB the memories should be very similar with 24-bit addressing. Switch into and enable 4-bit / QPI mode.

Bring up your own BSP based on the numerous examples in the CubeF4, and related code repositories.

The "Mapping" basically uses the command/functionality you have working as a template, make those work, then switch into this mode that maps the 0x90000000 address region into the address space sent to the QSPI memory. Once in this mode you can't talk to the memory via the command methods, you'd have to Abort to get out of Memory Mapped Mode, to say write, or read status, etc.

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

Thanks, the problem is that STM32446E-EVAL use a old N25Q128A13EF840E memory.

0693W00000Y6mnJQAR.jpgThis old chip have a different command, for example 0x85

(#define READ_VOL_CFG_REG_CMD     0x85),

not present in the S25FL.

Than I don't know the correct command sequence for S25FL

The followd is a table command migration from

0693W00000Y6mnnQAB.jpgThis is why I am looking a specific example for the S25FL family, even just the sequence of commands

Thanks

IlConte
Associate III

Thanks, I adjusted the commands and memory registers and everything works.

The memory it is automatically mapped at 0x9000 0000, it is possible to move it to other address? How is it defined at this location ? In the linker file .ld it isn't nothing specificied at this address !

0x90000000 is define architecturally, basically the top level address decoder recognizes the 0x9 in the high nibble of the address.

There might be a bank/swap mechanism to get to to 0xA0000000, read through the Reference Manual

The linker file is where you direct it's use/placement of memories. You can describe a 8MB region at 0x90000000, and then direct content into there.

I might break your code into pieces, a loader that brings up the clock, pins, external memories, etc. and then transfers control. Your app code can then have a more complex mix of internal/external memory. The architecture doesn't provide caching, so external will be slower, so use for large blobs of data, or non-critical code.

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

Thanks, now i have understud, I couldn't find the address because it is in the architecture !

I use the external memory for image, i think it is correct !