S32K341 QuadSPI

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32K341 QuadSPI

Jump to solution
132 Views
Mateusz_K
Contributor I

I want to use external flash with S32K341. I am trying to read id of the external flash memory. When I try to do using IP command, I get stuck waiting for SR[BUSY] flag to become 0. Data, cs, and clk lines quiet. Data lines are in a high state, clk is low. I want to use internal FIRC. 

What steps duirng the initialization am i missing? 

1. QuadSPI clock enable in MC_ME

2. Pin setup, copied from the example in RTD package, considering S32K342 quad spi.

3. Enable QuadSPI by MCR module

4. Unlocking LUT, writing sequence (cmd(0x9F), read, stop) on 0 index, locking LUT

5. Starting by writing address 0x00 to SFAR and 0 to IPCR[SEQID], 4 to  IDATSZ

 

Why are the no signal on data lines? 

0 Kudos
1 Solution
109 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

Why you are not using NXP drivers?

A driver is a part of RTD FLS drivers pack (real-time time flash driver, supporting internal flash as well as QuadSPI):
https://www.nxp.com/design/software/automotive-software-and-tools/real-time-drivers-rtd:AUTOMOTIVE-R...

Otherwise there is an appnote dealing with QuadSPI:

https://www.nxp.com/docs/en/application-note/AN12193.pdf

QuadSPI is highly configurable module because it uses look-up tables for SPI commands what should theoretically allow user to adapt the code to any SPI memory.

View solution in original post

0 Kudos
2 Replies
110 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

Why you are not using NXP drivers?

A driver is a part of RTD FLS drivers pack (real-time time flash driver, supporting internal flash as well as QuadSPI):
https://www.nxp.com/design/software/automotive-software-and-tools/real-time-drivers-rtd:AUTOMOTIVE-R...

Otherwise there is an appnote dealing with QuadSPI:

https://www.nxp.com/docs/en/application-note/AN12193.pdf

QuadSPI is highly configurable module because it uses look-up tables for SPI commands what should theoretically allow user to adapt the code to any SPI memory.

0 Kudos
99 Views
Mateusz_K
Contributor I

Thank you for the answer. I am communicating with the device with through ARM DAP. I am relaying on the drivers but not using them. 

I managed to properly initialize the device. Now I want to read the ID of the Ext flash. I am sending proper command, and getting right answer. RBSR register shows that new data appeared in the buffer. But when I read the RDBR register there is no data in them. 

0 Kudos