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?
Solved! Go to Solution.
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:
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.
I hope this clears things up.
BR,
Edwin.
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:
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.
I hope this clears things up.
BR,
Edwin.
Thank you.
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.
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