[i.MX RT1064] FlexSPI NOR ROM API get_config writes to flash when using DDR option

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

[i.MX RT1064] FlexSPI NOR ROM API get_config writes to flash when using DDR option

90 Views
jar
Contributor I

Hello!

I'm currently developing a custom firmware update mechanism on the MIMXRT1064 CVL5B processor. For the most part things are working as expected, but I noticed that the checksum for the firmware image in flash memory wasn't correct. After some investigating I realized that the get_config function of the FlexSPI NOR ROM API writes some values (a test pattern?) to address 0x70000200.

I'm running my code using the FlexSPI NOR XIP configuration from SDK_25_09_00_MIMXRT1064xxxxB/boards/evkmimxrt1064/xip/evkmimxrt1064_flexspi_nor_config.c/h.

The ROM API gets called from a function running from RAM (using IAR's __ramfunc keyword) with interrupts disabled:

#define g_bootloaderTree ((bootloader_api_entry_t *)*(uint32_t *)0x0020001c)
flexspi_nor_config_t nor_config = {0};
serial_nor_config_option_t nor_option = {.option0.U = 0xc0100003, .option1.U = 0};

status_t status = g_bootloaderTree->flexSpiNorDriver->get_config(1, &nor_config, &nor_option);

 

Flash memory before running the code:

0x70000200: ff ff ff ff ff ff ff ff
0x70000208: ff ff ff ff ff ff ff ff

 

Flash memory after running the code:


0x70000200: 00 11 22 33 44 55 66 77
0x70000208: 88 99 aa bb cc dd ee ff

 

Interestingly enough this doesn't happen when I set option0 to 0xc0000008 instead of 0xc0100003, but the second value results in a better read performance so I would prefer to keep using it. I have also tried to use the configuration I get from get_config directly as the qspiflash_config in the XIP boot header but that doesn't solve the issue either.

Is this expected behaviour or some kind of error? I didn't see anything about this in the documentation.

Best regards
Jan

Labels (1)
0 Kudos
Reply
0 Replies