Hi,
Dear i am developing custom bootloader for our application.
To store the received bin file new memory location of flash memory. i started exploring the flexspi rom api, when i execute this example without changing anything in the example code, my code getting crash.
IMxrt1170
void ROM_API_Init(void)
{
if ((ANADIG_MISC->MISC_DIFPROG & ANADIG_MISC_MISC_DIFPROG_CHIPID(0x10U)) != 0U)
{
g_bootloaderTree = ((bootloader_api_entry_t *)*(uint32_t *)0x0021001cU);
}
else
{
g_bootloaderTree = ((bootloader_api_entry_t *)*(uint32_t *)0x0020001cU);
}
after this function
status = ROM_FLEXSPI_NorFlash_GetConfig(FlexSpiInstance, &norConfig, &option);
during above function call program getting crash.
For execute example code is it required to change anything? with respect rt117xx
Since we are using XIP mode
Hi @sandeepc ,
Thank you for your interest in the NXP MIMXRT product, I would like to provide service for you.
Yes, I also find this issues, and will also do more digger in about it.
I also find, if you do the flash mass erase at first, then you can pass the rom_api testing.
BTW, if you test this code, no matter flash have code or not, all works OK:
\SDK_2_15_000_MIMXRT1170-EVK\boards\evkmimxrt1170\driver_examples\flexspi\nor\polling_transfer
So, when you test it, you can try:
1. rom_api: do mass erase at first before flash testing.
2. run flexspi_nor_polling_transfer demo
About the mentioned issue, I will do more testing on my side, any updated information, I will let you know.
Best Regards,
Kerry
Hi @sandeepc ,
Thanks for your updated information.
1. When you run the ROM API in the flash, whether it have issues on your side or not?
2. About the few page write failed, this should related to the write is very quick, eg, the previous write still not finished, then you do the new page write, just delay is not enough. You need to check the program finished status, make sure the write is really finished, then you can do the new page programming.
Please try it again.
If you still have question about it, please kindly let me know.
Best Regards,
Kerry
Hi @sandeepc ,
Do you try do the flash mass earse at first, then test it again, whether you still get the
ROM_FLEXSPI_NorFlash_GetConfig
issues or not?
Please try it, then give me updated information, thanks.
Best Regards,
Kerry
I tried its working fine,
i tried with dumping the multiple program data was present in the written memory location.
But only in the debug mode. if i come out from the debug mode previously written code only executes not the rom api flash code.
Can you suggest me any tool to dump .hex or bin file to rt1170.
I have noticed application running from RAM. but it should run from flash what are the things i need to change to run from flash.
Regards,
Sandeep C
Hi @sandeepc .
1. Can you suggest me any tool to dump .hex or bin file to rt1170.
=>Answer: If your app is the flash app, then you can use the debugger download it directly.
If your project is the RAM project, then it is the non-xip demo, you need to do the 0X2000 offset, then generate the .hex, and use the MCUBootutility or the SEC tool to download it.
You can refer to my document:
2. I have noticed application running from RAM. but it should run from flash what are the things i need to change to run from flash
=》Answer:
Deselect the link to RAM:
Best Regards,
Kerry
Thanks,
Issue is not in my side, just we have to do the following configuration after importing the example.
project properties ==> settings ==> manager linker script => link application to RAM ==> Apply and close.
Modification required:
Just in chip ID based on manufacturer.
if (*vendorID != kSerialFlash_Winbond_ManufacturerID)
{
status = kStatus_ROM_FLEXSPINOR_Flash_NotFound;
return status;
}
it worked fine without any other modification to the code.
Issue:
RUN mode: Regarding Page write/erase working fine.
DEBUG mode: when i read written memory of my custom data it will not write or erase perfectly.
regarding the above issue am working on it.
Regards:
sandeep C