Hi
We are developing application on ImxRT1064_EVK where we want to upload the JSON config files into 64 MB QSPI NOR flash and during the start up we want to read the JSON and configure the system settings required to operate.
We have written the python script to copy the JSON files into build directory and create "littlefs.img" and flash into the QSPI through CMakeconfig. But there is no success in that.
Is there a way to store and read the JSON files from the QSPI path?
Regards
Srinivas
Hi Srinivas,
you can you MCUXpresso Secure Provisioning tool (https://nxp.com/mcupresso/secure
- see main menu > Tools > Flash Programmer to read and write the flash
- or you can build the bootable image and generate write script, that will write into the flash your image and the additional files. See [Additional images] button on the build page, you can add any file there. On the write, the tool generates the write script, so you can additionally modify/customize the script.
Hi Marek,
Thank you for the quick response.
Is the Secure Provisioning tool will allow to flash into 64 MB nor flexspi flash instead of 4 MB internal main flash?
We want to flash the data files into 64 MB QSPI flash which is available on IMXrt1064 EVK.
Regards
Srinivas
It sounds like you are using 0x6000_0000 for FlexSPI1, as 0x7000_0000 for FlexSPI2 at is already used for the NOR flash integrated into RT1064 SOC. PLease let me know otherwise. If this is the case, here is my analysis:
The SPT ( for short ) will not allow you to write additional images into the 0x6000_000 adress space.
Or allow you to change FlexSPI interface .
The reason is that the SPT creates a bootable image, and the RT1064 can only boot from 0x7000_0000 address space of FlexSPI2,. The SOC desing it does not allow you to boot from FlexSPI1 at 0x6000_0000.
If you want to use a tool to write to the external flash at 0x6000_0000 it is possible. The important thing is that you need to initialize the FlexSPI1 and the FlexSPI pins. The goods news is that we already have an SDK example, it is the evkmimxrt1064_flexspi_nor_polling_transfer this example already does this and it is a good starting point to know what you need to do write into that external flash.
As I mentioned before the SPT is limited and only writes to the internal flash at 0x7000_0000. If you want to write at 0x6000_0000 you will need to follow what the above demo does and have FlexSPI1 initialized. This migth imply to have flashloader project, that does this and receives the data to be programmed at 0x6000_0000, where the 64 MB memory lies. Per my understanding some work needs to be done to get your external flash, but it is not too complicated.
Please let me know your comments or any questions you may have.
Diego
Hi Diego,
Thank you for the clarification. We are using Zephyr platform to develop the software and accessing the below NOR memory to flash the JSON config files. Below is the configuration
&flexspi
{
flash0: is25wp064@0
{
compatible = "nxp,imx-flexspi-nor";
reg = <0x0>;
size = <0x4000000>; // 64 MB
spi-max-frequency = <133000000>; // 133 MHz
status = "okay";
jedec-id = [9D 70 17];
partitions
{
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
storage_partition: partition@0 {
label = "storage";
reg = <0x0 0x800000>;
};
};
};
};
/ {
aliases {
flash0 = &flash0; // Use flash0 as an alias for nxp_imx-flexspi-nor@0
};
};
We are able to mount the flash in the code and able to open the directory and Crete the txt file into that. But we could not able to place the JSON files into "/lfs"mount to read from the program.
Please suggest
Regards
Srinivas
I apologize for the delayed response, I am very sorry that I missed your reply! are you still facing this issue? or did you find something else to share, during this time? if so, could you share more instructions and files to replicate the issue on my end?
Diego
hi Diego,
Thank you for the revert.
Still the issue exist. I could able to create the txt file on littlefs dir. But I want to copy the JSON files into littlefs config folder. That is not happening
Please guide us
Regards
Srinivas
Thanks for letting me know, I do apologize for the delayed reply due to holiday season, let me get back to you.
Diego