How to select Chip Select Pin?

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

How to select Chip Select Pin?

Jump to solution
1,005 Views
john71
Senior Contributor I

I have a custom board with  i.MX RT1170.

And pinout

FLEXSPI1 4 bit A_DATA0 -
A_DATA3
Single QSPI
chip support (1b,
2b,4b)
Up to 2 A_SS0_B,
A_SS1_B

But the chip select pin is routed to A_SS1_B. The demo project (evkmimxrt1170_flexspi_nor_polling_transfer_cm7) operates other chip select pin - A_SS0_B. How can I change the default chip select configuration?

0 Kudos
1 Solution
851 Views
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @john71,

I understand now. As mentioned on the RM: The "FlexSPI configuration depends on the chip configuration". In other words, it is the chip arrangement that will determine the FlexSPI module's configuration and connections.

To exemplify this, I am using the peripherals tool. Since I am yet to route each of module's signals to a pin, the tool gives me a warning of the pins the module is expecting to use. When setting up the FlexSPI1 module, I am able to select what port of the FlexSPI I will use. Notice how changing the operation port automatically changes the CS pin that the tool expects me to route:

EdwinHz_0-1694038945840.png

EdwinHz_1-1694039237414.png

EdwinHz_2-1694039260864.png

This exemplifies that the SS is determined by the port configuration. Since the evkmimxrt1170_flexspi_nor_polling_transfer_cm7 defines the flash port as port A1, it will use A_SS0_B.

EdwinHz_3-1694039632849.png

I hope this clears things up.

BR,
Edwin.

 

 

View solution in original post

4 Replies
852 Views
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @john71,

I understand now. As mentioned on the RM: The "FlexSPI configuration depends on the chip configuration". In other words, it is the chip arrangement that will determine the FlexSPI module's configuration and connections.

To exemplify this, I am using the peripherals tool. Since I am yet to route each of module's signals to a pin, the tool gives me a warning of the pins the module is expecting to use. When setting up the FlexSPI1 module, I am able to select what port of the FlexSPI I will use. Notice how changing the operation port automatically changes the CS pin that the tool expects me to route:

EdwinHz_0-1694038945840.png

EdwinHz_1-1694039237414.png

EdwinHz_2-1694039260864.png

This exemplifies that the SS is determined by the port configuration. Since the evkmimxrt1170_flexspi_nor_polling_transfer_cm7 defines the flash port as port A1, it will use A_SS0_B.

EdwinHz_3-1694039632849.png

I hope this clears things up.

BR,
Edwin.

 

 

765 Views
john71
Senior Contributor I

Thank you.

0 Kudos
939 Views
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @john71,

Take a look into the "pin_mux.c" file of the demo project. Under "BOARD_InitPins", you will see the configuration of all of the used pins, including the FlexSPI pins and more specifically the SS pin. This is where the demo project configures the A_SS0_B to be used as chip select for FlexSPI, using 

IOMUXC_SetPinMux(IOMUXC_GPIO_SD_B2_06_FLEXSPI1_A_SS0_B, 1U);

and

IOMUXC_SetPinConfig(IOMUXC_GPIO_SD_B2_06_FLEXSPI1_A_SS0_B, 0x0AU);

BR,
Edwin.

0 Kudos
895 Views
john71
Senior Contributor I

Thank you. But even if I configure it to other pin (on hardware level)

(FLEXSPI1_A_SS1 instead of FLEXSPI1_A_SS0)

IOMUXC_SetPinMux(IOMUXC_GPIO_SD_B2_06_FLEXSPI1_A_SS1_B, 1U);

 on the software level - the program refers to FLEXSPI1_A_SS0. as I understand (from the data sheet) a flash address loaded to  (FLSHxCR0[FLSHSZ]) dictates which SS to operate.

A flash chip select. The flash memory access address and flash memory size setting
(
FLSHxCR0[FLSHSZ]) determine the chip select

0 Kudos