Hello NXP,
Can we use FlexSPI to connet the hardware and use both device at the same time?
PortA->NOR FLASH
PortB->PSRAM
And is there any conguration example for reference?
Thanks a lot
Yes, on the NXP MCX Nx4x, you can use both FlexSPI Port A and Port B simultaneously to connect to two different memory devices.
PortA->NOR FLASH
PortB->PSRAM
You must ensure that:
NOR Flash and PSRAM are not sharing any conflicting pins.
You can refer to the flexspi_octal_polling_transfer
BR
Harry
Hi Harry,
According to Spark's description, should we check the device_config and clk source?
I saw
typedef struct _flexspi_config
{
......
#if defined(FSL_FEATURE_FLEXSPI_SUPPORT_SEPERATE_RXCLKSRC_PORTB) && FSL_FEATURE_FLEXSPI_SUPPORT_SEPERATE_RXCLKSRC_PORTB
flexspi_read_sample_clock_t rxSampleClockPortB; /*!< Sample Clock source_b selection for Flash Reading. */
#endif
1. While using portA and PortB, is it required to use separate rxclksource?
2. Should we check the &deviceconfig that pass to FLEXSPI_SetFlashConfig()?
Hi Harry,
The sample code only provides how to access NOR Flash ID on PortA and I try to add code to access PortB with PSRAM connected on MCX-N5XX-EVK. Here is the experiment result for you reference:
The FlexSPI setting:
PortA->NOR FLASH
PortB->PSRAM
Test Case 1 : Successful
Initial PortA and Read PortA flash ID(1 byte)
Test Case 2 : Successful
Initial Port B and Read Port B flash ID(1 byte)
Test Case 3 : Failed
Initially both PortA and Port B then read PortA and Port B flash ID(1 byte) individually with the address
Here are the code snippets for your reference. Please check if we made some mistakes or need more configuration on PortA and PortB situation.
code modification on flexspi_nor_flash_init for initalize both Port A and Port B flash device
Add offset to flashXfer.deviceAddress to read Port B device
Here are the modified files and the whole project archive for your reference:
Hello,
Many NXP microcontrollers featuring FlexSPI (like the i.MX RT series) have two independent FlexSPI channels (Port A and Port B). Each port can be configured to communicate with different types of memory devices. This allows you to connect your NOR Flash to one port and your PSRAM to the other.
Hi
I refer to SDK sample, but that connected to one flash device not two devices concurrently.
I'm afraid that I missing something configure to make two devices workable at the same time.
Is there any sample configure for reference?
Or how can I make sure I did the correct configure from register level?
thanks