Tool/software:
Hi,
I am trying to get the Flash API working and following the FAQ among other resources. I have the linker file setup to store the flash API library, and am following the steps below. However, I am using the Device_init() function which does step b. before step a. but other than that everything else is in the same order. The problem occurs when I call Fapi_setActiveFlashBank(Fapi_FlashBank0); I get the Fapi_Error_InvalidHclkValue error returned. I'm not sure what could be going wrong? The system clock is configured to be 200 MHz.
a. Configure PLL
b. Copy the Flash initialization code from Flash to RAM
c. Copy the Flash API from Flash to RAM
d. Initialize Flash wait-states, fall back power mode, performance features and ECC
e. Grab the ownership of the Flash pump using pump semaphore (not applicable for some devices - ex. TMS320F28004x).
f. EALLOW (C28x) or MWRALLOW (ARM) should be executed before calling Flash API functions to allow writes to protected registers. This is required for Concerto, F2837xD and F2807x devices.
g. EDIS should be executed after calling Flash API functions to disallow writes to protected registers. This is required for Concerto, F2837xD, F2837xS and F2807x devices.
h. Initialize the Flash API by providing the Flash register-base address and operating frequency
Fapi_initializeAPI(F021_CPU1_BASE_ADDRESS,200);
i. Initialize the Flash bank and FMC for erase and program operations
Fapi_setActiveFlashBank(Fapi_FlashBank0);
