2383801_en-US

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

2383801_en-US

2383801_en-US

How can I configure GPIO_EMC_B2_18 as FLEXSPI1_A_DQS and set the clock frequency to 133 MHz?

Hello,

I want to configure GPIO_EMC_B2_18 as FLEXSPI1_A_DQS and set the clock frequency to 133 MHz on the i.MX RT1175.
I understand that GPIO_EMC_B2_18 cannot be set to FLEXSPI1_A_DQS during boot.
Therefore, I’m trying to run it at 60 MHz during boot and change it to 133 MHz in the application, but it doesn’t work.
I am using the evkbmimxrt1170_flexspi_nor_polling_transfer project and have modified the relevant section of `flexspi_nor_flash_init()` in `flexspi_nor_flash_ops.c`.

```

IOMUXC_SetPinMux(IOMUXC_GPIO_EMC_B2_18_FLEXSPI1_A_DQS, 1U);
IOMUXC_SetPinConfig(IOMUXC_GPIO_EMC_B2_18_FLEXSPI1_A_DQS, 0x0AU);
CLOCK_SetRootClockDiv(kCLOCK_Root_Flexspi1, 4);
CLOCK_SetRootClockMux(kCLOCK_Root_Flexspi1, 5);
config.rxSampleClock = kFLEXSPI_ReadSampleClkLoopbackFromDqsPad;

```

The system hangs when the clock frequency is set to 133MHz.

```

CLOCK_SetRootClockDiv(kCLOCK_Root_Flexspi1, 5);
CLOCK_SetRootClockMux(kCLOCK_Root_Flexspi1, 5);

```

It works when the clock frequency is set to 105MHz.

How can I configure GPIO_EMC_B2_18 to FLEXSPI1_A_DQS and set the clock frequency to 133 MHz?

Re: How can I configure GPIO_EMC_B2_18 as FLEXSPI1_A_DQS and set the clock frequency to 133 MHz?Hi @mayliu1,

Thanks for your reply.
It’s true that the secondary ping group may only operate at 100 MHz, but I’m planning to use the primary ping group and change only the DQS to GPIO_EMC_B2_18. The reason is that I’m using GPIO_SD_B2_05 for USDHC2_CMD.

Pin Configuration
FLEXSPI1_A_SS0_B GPIO_SD_B2_06
FLEXSPI1_A_SCLK GPIO_SD_B2_07
FLEXSPI1_A_DATA0 GPIO_SD_B2_08
FLEXSPI1_A_DATA1 GPIO_SD_B2_09
FLEXSPI1_A_DATA2 GPIO_SD_B2_10
FLEXSPI1_A_DATA3 GPIO_SD_B2_11
FLEXSPI1_A_DQS GPIO_SD_B2_05 (boot)

In the application, only FLEXSPI1_A_DQS is changed to GPIO_EMC_B2_18.
FLEXSPI1_A_DQS GPIO_EMC_B2_18

As a test, I changed the clock frequency from 60 MHz (boot) to 133 MHz on the EVK without changing FLEXSPI1_A_DQS—leaving it set to GPIO_SD_B2_05—and it hung up in the same way.
Since the xip configuration was set to .readSampleClksrc=kFlexSPIReadSampleClk_LoopbackInternally, I changed it to kFlexSPIReadSampleClk_LoopbackFromDqsPad, and was able to run it at 133 MHz.
Next, I tried changing the DQS to GPIO_EMC_B2_18, and was able to run it at 133 MHz.

Is this approach acceptable?
Also, during boot, GPIO_SD_B2_05 is not floating. Is it okay to set it to `kFlexSPIReadSampleClk_LoopbackFromDqsPad` and run it at 60 MHz?
Re: How can I configure GPIO_EMC_B2_18 as FLEXSPI1_A_DQS and set the clock frequency to 133 MHz?

Hi @Shuhei_D ,

Thank you so much for your interest in our products and for using our community.

Please refer to the following post for more details:

https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT-1176-FlexSPI-RW-frequency-DQS/m-p/1871808

According to the RT1170 Reference Manual, when using the secondary pin group, the maximum supported FlexSPI flash frequency is 100 MHz.

Could you please check your project configuration and confirm whether it matches the scenario described in the link above?

Wish it helps you

Best Regards

May

Re: How can I configure GPIO_EMC_B2_18 as FLEXSPI1_A_DQS and set the clock frequency to 133 MHz?Thank you for your reply.

Upon checking the schematics, I see that GPIO_EMC_B2_18 is floating.
Re: How can I configure GPIO_EMC_B2_18 as FLEXSPI1_A_DQS and set the clock frequency to 133 MHz?

It seems you want to switch the SPI clock freq from 60MHz to 133MHz to drive the NOR flash external. But 105MHz seems ok so you may need to check the layout side according to signal integrity with SPI high frequncey. Do you review the schematics?

Tags (1)
No ratings
Version history
Last update:
Tuesday
Updated by: