CUSTOM RT685 won't boot when flash driver is enabled (CONFIG_FLASH=y) - blocking LittleFS and MCUboot usage #95172
-
Hello, I been working with a custom board based on the RT600 with an octal memory ISSI IS25WX256-JHLE. I been trying to add support for Little FS and eventually MCUBOOT but when I explored the examples available with these features, both of them use CONFIG_FLASH and some other Kconfig options. In my case when I am working with my FCB without these Kconfig options my system boots and works just fine, but as soon as I add CONFIG_FLASH, my system just bricks and I get no output on my console. I been trying multiple workarounds like commentating some of the initialization routines of the driver "flash_mcux_flexspi_nor.c", but my ideas doesn't seem to work. my current flash_config.c looks like this: const flexspi_nor_config_t flexspi_config = {
// /* Configure Register (Non-Volatile CR) - Comando B1h */
}; custom dts and dtsi: / {
}; &flexspi {
};
I been able to read memory areas using memory-map access at 0x8000000 and been able to confirm this by reading the fcb and later verified with j-flash commander reading the exact same region with the same data. my code is based on the repo version 4.1.0 is there a way I could not use this options and still configure little fs and mcuboot to work with my project ? is there something I missing ? please any help will be greatly appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @skanda19 , To erase or program the flash in your application, you need to use a flash driver for that, which is why I see IS25WX256 is an octal DDR flash. There are some similar flash devices that have their own FlexSPI driver, like these 2 below. You can use those as a reference for enabling the IS25WX256. Best regards |
Beta Was this translation helpful? Give feedback.
Hi @skanda19 ,
It sounds like you have the Flash Config Block (FCB) of the RT685 configured correctly to eXecute-in-Place (XIP) from this flash. The FCB configures the bootloader in ROM to read from the external memory and XIP. However, the FCB only configures for reading the flash.
To erase or program the flash in your application, you need to use a flash driver for that, which is why
CONFIG_FLASH
needs to be selected. I do not see that IS25WX256 is supported today in the FlexSPI drivers. The flash_mcux_flexspi_nor.c driver supports many devices, and uses SFDP to query the external flash to configure the FlexSPI. But it also uses the vendor ID read from the flash to configure the FlexSPI…