6305.FaRegister Status.docxWe are developing boot loader for TMS570LS3137 under IAR enviroment. And I went through the TI example code and made some change to incorporate to my project.
The library I am using is \F021_API_CortexR4_BE_V3D16.lib. And add" initialize by copy { readonly, readwrite };" in the flash.icf file so the program can be run in RAM from 0x80000000.
Issue:
I developed a flash test program ( F021_InitializeBanks( ); F021_ActiveBank_EnableSectors ( ); sector_erase ();. and program).
However in sector erase, after Fapi_issueAsyncCommandWithAddress(Fapi_EraseSector, eraseStartAddr); I always get FMSTAT=818.
which is related with this?
and if I am only working on one bank, I think I only need to F021_InitializeBanks( ); F021_ActiveBank_EnableSectors ( ); one time, not necessary multi times for each erase and program functions, right?
Other questions:
1 in TI example
uint32_t Fapi_BlockProgram( uint32_t Bank, uint32_t Flash_Start_Address, uint32_t Data_Start_Address, uint32_t Size_In_Bytes)
it shows if Size_In_Bytes> 16, the program is based on 16 bytes untill it gets to total Size_In_Bytes .
it shows if Size_In_Bytes< 16, the program is just for Size_In_Bytes. Can it be 1, 2, 3, 4? The reason I am asking is the data width of flash is 64 bits, so is there s requirement of alighnment of 64 bits(8 bytes)?
2 in TI exmaple BL_flash.c
in Fapi_BlockErase(), Fapi_enableMainBankSectors(0xFFFE);
in Fapi_BlockProgram, Fapi_enableMainBankSectors(0xFF);
Is there any reason the enabled sectors are different?