Execute the Flash API code from RAM or a Flash Bank not selected for EEPROM Emulation (some functions must be run from RAM).
Configure the API for the correct CPU frequency of operation
Follow the Flash API checklist to integrate the API into an application
Configure the PLL as needed and pass the configured CPUCLK value to Fapi_initializeAPI() function.
Configure waitstates as per the device-specific data manual before calling Flash API functions. The Flash API issues and errors if the waitstate configured by the application is not appropriate for the operating frequency of the application.
Do not execute Flash API from the same Flash Bank that is selected for emulation
Do not configure interrupt service routines (ISRs) that result in read/fetch access from the Flash bank on which an erase/program operation is in progress. Flash API functions, user application functions that call Flash API functions, and any ISRs, must be executed from RAM or the flash bank on which there is no active erase/program operation in progress.
Do not access the Flash bank on which the Flash erase/program operation is in progress