How to select Chip Select Pin?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to select Chip Select Pin?

ソリューションへジャンプ
1,663件の閲覧回数
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 件の賞賛
返信
1 解決策
1,509件の閲覧回数
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.

 

 

元の投稿で解決策を見る

4 返答(返信)
1,510件の閲覧回数
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.

 

 

1,423件の閲覧回数
john71
Senior Contributor I

Thank you.

0 件の賞賛
返信
1,597件の閲覧回数
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 件の賞賛
返信
1,553件の閲覧回数
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 件の賞賛
返信