I’m looking for some guidance on how to configure, load and debug using external QuadSPI FLASHes other than the single boot device when using MCUSpresso.
I’ve got a custom board that uses either a RT1052, or a RT1064, that has two S25FL256SAGBFI313 QuadSPI FLASHes.
We're still using MCUXpresso 10.3.1 with SDK 2.5 and 2.6.
Both QuadSPI FLASHes are connected to FlexSPI (1) ‘A’ bus:
the first uses the A_SS0_B select on L3, and the second the A_SS1_B on H13.
Using the RT1052, I have projects that can program, debug and run using the first external FLASH.
Using the RT1064, similar, but using the internal FLASH.
On either I can run variations of the flexspi_nor_polling_transfer examples.
In those after manually configuring FlexSPI(1) and the A_SS1_B pin on H13 I can erase and program each external FLASH separately.
Using the RT1052, I added a line to the qspiflash_config structure in flexspi_nor_config.c
.sflashA2Size = 32u * 1024u * 1024u,
After booting this code, the FLEXSPI controller is configured as expected, but the bootloader doesn’t configure the second chip select on A_SS1_B on H13.
After I configure the pin in pin_mux.c, then I can access the second FLASH.
First RT1052 question: What is the correct way to get the boot loader to enable the A_SS1_B pin?
I know I can do it by adding to the DCD, but the new tool doesn’t support the registers.
Does the bootloader?
What does csPadSettingOverride do, and where is it documented?
Also using the RT1052, I updated the MCU settings to include the second FLASH, and also had it use the same MIMXRT1050_SFDP_QSPI.cfx driver:
When I start the debugger, in the debug messages console, I see that MIMXRT1050_SFDP_QSPI.cfx is called twice.
But when it probes it uses the same address (0x60000000) twice instead of 0x62000000 for the second FLASH.
Second RT1052 question: How do I configure the MCUXexpresso so that the debugger can program code into the second FLASH?
Building on this, for the RT1064 the qspiflash_config structure in flexspi_nor_config.c is used by the bootloader to configure FLexSPI2 to access the internal FLASH at 0x70000000.
First RT1064 question: How do I configure FlexSPI(1) to access the external QuadSPI FLASHes at 0x60000000?
Second RT1064 question: And what else is needed to get MCUXpresso able to load and debug these external FLASHes?
Thanks for any insight,
Steve
Hi Steve Cornelius ,
Answer your two questions:
1. RT1052 question: What is the correct way to get the boot loader to enable the A_SS1_B pin?
I know I can do it by adding to the DCD, but the new tool doesn’t support the registers.
Does the bootloader?
What does csPadSettingOverride do, and where is it documented?
Answer: DCD is used for the SDRAM, so you still need to configure the A_SS1_B pin through the DCD.
Do you want to download the code to the flash which is connect to the SS0, right? To the ROM,SS1 just can be used when SS0 is already used. But we think you don't need to configure SS1 with ROM, you totally can download the code to the SS0 flash, then in the SS0 flash use the code to configure the SS1 pins.
About the csPadSettingOverride, you just need to set it to 0, this bit is used to modify the pad default configuration, customer normally don't need to configure it, just leave it as default.
2. RT1052 question: How do I configure the MCUXexpresso so that the debugger can program code into the second FLASH?
Answer: You can't do it like that, as you know, MIMXRT1050_SFDP_QSPI.cfx is the flashloader used to download the code to the external QSPI flash, it is default to program the QSPI like the MIMXRT1050-EVKB qspi connections, so if you add another QSPI flash, I think you need to write your own program algorithm file, you can refer to the MIMXRT1050_SFDP_QSPI.cfx source code, which you can find it from this folder:
<install dir>/Examples/Flashdrivers/NXP/iMXRT
You can write your own program file, which is used to program your second qspi flash.
3. RT1064 question: How do I configure FlexSPI(1) to access the external QuadSPI FLASHes at 0x60000000?
Answer: please check the RM Table 8-1. ROM Bootloader Peripheral PinMux, so you can't connect the FlexSPI to used as the boot flash. You just can boot it from internal flash through the FlexSPI interface.
4. RT1064 question: And what else is needed to get MCUXpresso able to load and debug these external
Answer: No way to debug external flash with flexSPI, if you check the ROM bootloader table, you will find no other external FlexSPI interface for your external flash.
Wish it helps you!
If you still have questions about it, please kindly let me know.
Have a great day,
Kerry
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------