Part Number: LAUNCHXL-F280049C
Calling all FAPI Gurus,
Seeing odd issues with FAPI during asynchronous erase mode and program flash data only or auto ECC modes. Added #prama to reduce optimizations well below the applications but that did not help these issues.
The FAPI calls are placed in LSRAM via #pragma and F021_API_F28004x_FPU32_EABI.lib (.bss) was copied to LSRAM. Flash memory is first initialized with 5 wait states, 4 caused illegal instruction exceptions.
Erase sectors had skipped middle flash addresses of 4 sectors, FAPI and FSM did not report an error. Changed code to blank check each sector after erase, time will tell if that helps. Seems erase mode may need to bang flash in a loop until blank check succeeds so it does not cause invalid instruction exception after POR. Could only erase these two sectors by debug stepping F6 with F7 in the erase command for those sectors, a few passes debug step passes over the function did erase the sectors. Be sure to use Memory Browser to check your flash sectors are actually being erased.
In program mode the address pointer is jumping 2 or 4 addresses past the destination pointer after first write 64bits. That leaves voids (FFFF) between actual data as it is doing. The two data types tested (uint16_t x4 words) and (float32_t x2 words), each data type has the same skip behavior. Though it seems uint16_t writes float data in the same way as float32_t. What is causing address skip occur in a 64bit alignment? Somehow the CPU or FPU knows float variable exist but is not showing in debug how that is.
After the second increment to address pointer did not write data it skips again then FAPI posts exception "Invalid Data Buffer length". Yet sure seems FAPI caused the exception, not the 4 loop pointers. FAPI should be adding to the start address pointer internally, seems that it did not do so. Do we have to clear status after every program write that call is not shown in the program mode flow chart or examples.



