Hi support team,
I am working with IMXRT1062 and facing issue with flex SPI nor flash API There are 2 scenarios one is working and other is not working. made changes in .icf file after increasing the bin size we changed m_data_start to m_data2_start.
Working - In this scenario my bin size is less then 80k .icf file for this is MIMXRT1062xxxxx_flexspi_nor.icf(working with this .icf file)
Not Working - In this scenario my bin size is 200k so that changed my .icf file MIMXRT1062xxxxx_flexspi_nor_1.icf file in attachment.
The only change in code is we are using different MIMXRT1062xxxxx_flexspi_nor.icf file
i am attaching the both .icf file
uint8_t bin_data[32678]; //globle data to collect UART ISR data
int state_machine(const unsigned char* dataPtr, const unsigned int dataLen)
{
memcpy(bin_data+(index * dataLen, dataPtr, dataLen); this is used to fill 32k data and further stored in flash ignore the copy logic
flexspi_nor_flash_init(FLEXSPI);
flexspi_nor_enable_quad_mode(FLEXSPI);
for(sector = 0; sector <= 0x7; sector++){
flexspi_nor_flash_erase_sector(FLEXSPI, 0x00600000 + (0x00001000*sector),, (void *)(bin_data+(256*page));
}
for(page = 0; page <= 0x7F; page++){
flexspi_nor_flash_page_program(FLEXSPI, 0x00600000 + (256*page), (void *)(bin_data+(256*page)));
}
dfu_eflash_addr_fl = 0x00600000 +(0x8000);
dfu_eflash_addr_er = 0x00600000 +(0x8000) ;
}