Configuring external flash using MCUXpresso IDE for RT1170

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

Configuring external flash using MCUXpresso IDE for RT1170

469 Views
brundasathish
Contributor I

I am currently using a custom board with MIMXRT1176CVM8B. And along with this , the external flash is being used , with part number : W25Q01NW .

But i am not able to flash the code from MCUXpresso IDE to this new flash. (The error snapshot is attached) 

I have also made changes in evkbmimxrt1170_flexspi_nor_config.c

Parameter that was changed is: 

.sflashA1Size = 128u * 1024u * 1024u, // Changed: Because the new flash size is 128MB.

 

Is there any other configuration parameters that needs to be changed?

Thanks in advance 

brundasathish_0-1784105497191.png

 

0 Kudos
Reply
10 Replies

421 Views
db16122
Contributor IV

can you help to share your schematics for review as it is a 1.8V device? Meanwhile how about the SPI clk freq between the flash and the SOC?

0 Kudos
Reply

374 Views
brundasathish
Contributor I

Hi @db16122 , 

The power supply is configured to 1.8V and the clock is 133Mhz.

0 Kudos
Reply

296 Views
db16122
Contributor IV

db16122_0-1784609105020.png

db16122_1-1784609207652.png

 

FYI for 133MHz setting with schematics from AN12183 How to Enable Debugging for FLEXSPI NOR Flash

Tags (1)
0 Kudos
Reply

425 Views
Habib_MS
NXP Employee
NXP Employee

Hello @brundasathish,

Could you please confirm if you are using the recommended FlexSPI NOR QSPI pins mentioned in the table 11 "ROM Bootloader Peripheral PinMux," of the MIMXRT1160/1170 Hardware Development Guide? I highly recommend reviewing this document which it provides information about board layout recommendations and design checklists to ensure first-pass success and avoid board bring-up problems.

Also, could you please test your flash configuration with the Boot Memory Configuration feature in the Secure Provisioning Tool v26.6? This to verify your FCB configurations.

BR
Habib

0 Kudos
Reply

375 Views
brundasathish
Contributor I

Hi @Habib_MS ,

Thank you so much for the reply. We have configured the flexspi2 for the flash and these are the pins that are configured. This is a snapshot of MCUXpresso IDE pin configuration.

brundasathish_0-1784292758186.png

We tried configuring the flash using Secure provisioning tool . And this is the response we got . 

brundasathish_1-1784292809746.png

Thanks in adance

0 Kudos
Reply

310 Views
Habib_MS
NXP Employee
NXP Employee

Hello @brundasathish,
To boot from the FlexSPI2 secondary pin group, it is necessary to configure the corresponding eFuses, as described in Table 10-1 "ROM Bootloader Peripheral PinMux" of the RM, as shown the following image:

Habib_MS_2-1784582526588.png

Please take in mind that eFuse programming is an irreversible operation. Could you please corroborate that the corresponding fuses are adequately burned to use this secondary group of pins? If the fuses are correctly burned, could you please test again your flash configurations using the Boot Memory Configuration?

Additionally, please note that this pin configuration only supports low-speed read operations, as it does not provide a DQS signal path. Therefore, the maximum supported frequency is 60 MHz in SDR mode and 30 MHz in DDR mode. Please refer to the following community post as it contains a more detailed explanation.


BR
Habib

0 Kudos
Reply

273 Views
brundasathish
Contributor I

Hi @Habib_MS ,

Thank you so much for the reply.

I am currently working on configuring and testing the external flash using MCU Secure Provisioning tool (Serial Downloader) mode.

I have set the FLEXSPI_INSTANCE =1 using the BOOT_CFG [11] pin on the external boot switch (as FLEXSPI2 is used)

And how do i enable the FLEXSPI_PIN_GROUP_SEL. Is it via the OTP configuration in MCU Secure Provisioning tool???

And with the above-mentioned boot switch changes (Serial Downloader mode and BOOT_CFG [11] =1) and below attached boot memory configurations in MCU Secure Provisioning tool, I am able to initialize the flash, read the flash content.

But i am not able to erase or write.

I am attaching the boot memory configuration screenshot.

brundasathish_0-1784637645041.png

Thanks ,

Brunda Sathish

0 Kudos
Reply

206 Views
Habib_MS
NXP Employee
NXP Employee

Hello @brundasathish,

Yes, the OTP configuration can be used to achieve this.If your flash memory settings work correctly when you test them, you can use the button "Convert to Complete FCB" to make your FCB and review this community post, particularly the steps starting from point 15. That section provides a more detailed explanation of how the Secure Provisioning Tool generates the boot memory configuration and may help clarify the parameters and output produced by the tool.

I would like to mention that the maximum supported clock frequency for the FlexSPI2 secondary pin group is 60 MHz in SDR mode and 30 MHz in DDR mode. For additional details, please refer to this community post.

Could you please provide me which version of the MCUXpresso Secure Provisioning Tool you are currently using?

The latest release is v26.06, and I highly recommend using this version, as it includes the most recent enhancements, bug fixes, and overall improvements compared to previous releases.

BR
Habib

0 Kudos
Reply

74 Views
brundasathish
Contributor I

Hi @Habib_MS ,

I am using secure provisioning tool of version 26.06.

And when OTP configuration is made for FLEXSPI_PIN_GROUP_SEL in secure provisioning tool, only this bit gets fused or in general all the other values in the fuse field gets burnt together ?

Thanks in advance.

Regards ,

Brunda Sathish

0 Kudos
Reply

50 Views
Habib_MS
NXP Employee
NXP Employee

Hello @brundasathish,

Please make sure that you are in the correct workspace selected, for create a new workspace you can refer to the section New workspace creation of the Mcuxpresso Secure provisioning tool v26.06 User's guide.
As mentioned in the section "PFR/IFR/BCA/FCF and OTP differences" of the Mcuxpresso Secure provisioning tool v26.06 user's guide the OTP configurations are burned item by item:
 

Habib_MS_1-1785189434439.png

I also highly recommend reviewing the OTP Configuration section of the guide, as it provides important information for properly programming OTP fuses on the RT1170.
 

BR
Habib

0 Kudos
Reply