Tool/software:
Dear TI engineers,
I use halcogen and code composer studio.
I get the same error for other flash api functions too.
Properties -> Include Options -> Add-> Flash API include file.
This way I include the flash API.
Why am I getting this compilation error?
My code.
/* USER CODE BEGIN (0) */
#include "Types.h"
#include "F021.h"
/* USER CODE END */
/* Include Files */
#include "sys_common.h"
/* USER CODE BEGIN (1) */
#define SYS_CLK_FREQ 150
/* USER CODE END */
/** @fn void main(void)
* @brief Application main function
* @note This function is empty by default.
*
* This function is called after startup.
* The user can use this function to implement the application.
*/
/* USER CODE BEGIN (2) */
uint8_t DataBuffer[8] = {0,1,2,3,4,5,6,7};
/* USER CODE END */
int main(void)
{
/* USER CODE BEGIN (3) */
//_Enable_IRQ();
if ((Fapi_initializeFlashBanks((uint32_t)SYS_CLK_FREQ)) == Fapi_Status_Success)
{
Fapi_setActiveFlashBank(Fapi_FlashBank7);
Fapi_enableEepromBankSectors(0xFFFFFFFF,0xFFFFFFFF);
while( FAPI_CHECK_FSM_READY_BUSY != Fapi_Status_FsmReady );
while( FAPI_GET_FSM_STATUS != Fapi_Status_Success ); /* don't have to include this one*/
}
Fapi_issueAsyncCommandWithAddress(Fapi_EraseSector,(uint32_t*)0xF0200000);
while( FAPI_CHECK_FSM_READY_BUSY == Fapi_Status_FsmBusy );
while(FAPI_GET_FSM_STATUS != Fapi_Status_Success);
Fapi_issueProgrammingCommand((uint32_t*)0xF0200000,DataBuffer,8,0,0,Fapi_AutoEccGeneration);
while( FAPI_CHECK_FSM_READY_BUSY == Fapi_Status_FsmBusy );
while(FAPI_GET_FSM_STATUS != Fapi_Status_Success);
while(1)
{
;
}
/* USER CODE END */
return 0;
}