RT1170 FlexSPI sequential read

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

RT1170 FlexSPI sequential read

267 Views
Eugene3
Contributor II

I connect two ROMs which has QSP interface on FlexSPI2_A SS0 and SS1 in parallel.

I'd like to read these devices sequentially, but I couldn't understand how to configure and read them from reference manual.

Do you have sample code or documents?

 

For example, I'd like to assign address like the following.

SS0 : Address : 0x0000 - 0x0FFF

SS1 : Address : 0x1000 - 0x1FFF

And I'd like to read from 0x0000 to 0x1FFF continuously.

0 Kudos
7 Replies

235 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @Eugene3 ,

 

You may find demo code in the SDK package(SDK_2_15_000_MIMXRT1170-EVK\boards\evkmimxrt1170\driver_examples\flexspi)

We also provide an online training for this topic, please kindly refer to https://www.nxp.com/design/training/i-mx-rt1170-mcus-flexspi-controller:TIP-IMX-RT1170-CROSSOVER-MCU... for details.

 

General speaking, the Flash Control Register 0 (FLSHA1CR0 - FLSHB2CR0) configure the max flash size for each device, Please refer to "30.3.4 Flash memory map" in the RT1170 RM for more details.

 

Hope that helps,

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

170 Views
Eugene3
Contributor II

Hi @Kan_Li 

Thank you for your information.

I referred to flexspi_nor_polling_transfer.c and I could access the SS0 device or the SS1 device individually by changing "flexspi_port_t port" of FLEXSPI_SetFlashConfig().

However, I'd like to read/write 2 devices continuously like one device. In other words, I'd like to read from BaseAddr to (FA1_SIZE+FA2_SIZE) continuously without considering SS control.

If you have any source code that might be helpful, would you share with me?

 

Eugene3_0-1715672901926.png

 

0 Kudos

135 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @Eugene3 ,

 

For your case, I think you need to call FLEXSPI_SetFlashConfig() twice for both SS0 device and SS1 device.

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

121 Views
Eugene3
Contributor II

Hi @Kan_Li 

Thank you for your information.

I referred reference manual 30.7.2.15.2, and it says "FlexSPI determines the chip select automatically according to this start address".

I'd like to know how to use this feature.

Eugene3_0-1716248667129.png

 

0 Kudos

111 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @Eugene3 ,

 

I am sorry, but I could not get your point. When you use IP command to access the ext flash, you use this feature automatically, no need to configure anything to enable this feature.

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

 

0 Kudos

105 Views
Eugene3
Contributor II

Hi @Kan_Li 

Thank you.

I referred to "flexspi_nor_polling_transfer.c" but I couldn't figure out how to use IP command to access the ext flash. Do you have any sample source code to use IP command?

0 Kudos

86 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @Eugene3 ,

 

Actually IP commands are usually used for programming/erasing/configuration. AHB access is always recommended for reading, and that is how the demo of lexspi_nor_polling_transfer is implemented. 

 

Hope that helps,

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos