Tool/software: Code Composer Studio
Hi,
Recently I have been trying to develop a bootloader for the TMS570. I can get the CAN communication working and can get said communication to save to Bank 7 using the FEE driver however, whenever I attempt to use the F021 API Fapi functions outside of the FEE driver I get an undefentry interrupt called followed by an error saying that the function document cannot be found.
I have linked the API properly using the appropriate linker library however, no matter what I do I always get the same error even when I attempt to initialize the Fapi Bank.
Any help would be greatly appreciated.
Here is my code used for the flash writing I'd like to do:
uint32_t Fapi_UpdateStatusProgram( uint32_t Bank, uint32_t Flash_Start_Address, uint32_t Data_Start_Address, uint32_t Size_In_Bytes) { register uint32_t src = Data_Start_Address; register uint32_t dst = Flash_Start_Address; unsigned int bytes, status = 0; Fapi_StatusType oReturnCheck = Fapi_Status_Success; if (Size_In_Bytes < 16) bytes = Size_In_Bytes; else bytes = 16; Fapi_initializeAPI((Fapi_FmcRegistersType *)F021_CPU0_REGISTER_ADDRESS, (uint32_t)SYS_CLK_FREQ); oReturnCheck= Fapi_initializeFlashBanks(10); //10Mhz if((oReturnCheck == Fapi_Status_Success)){ oReturnCheck = Fapi_setActiveFlashBank(Fapi_FlashBank0); //while(FLASH_CONTROL_REGISTER->FmStat.FMSTAT_BITS.Busy == Fapi_Status_FsmBusy); delay(); } //delay(); Fapi_setActiveFlashBank((Fapi_FlashBankType)0); Fapi_issueProgrammingCommand((uint32_t *)dst, (uint8_t *)src, (uint32_t) bytes, //8, 0, 0, Fapi_AutoEccGeneration); while( Fapi_checkFsmForReady() == Fapi_Status_FsmBusy ); status = Flash_Program_Check(Flash_Start_Address, Data_Start_Address, Size_In_Bytes); delay(); return (status); }
Thanks,
Ron Haber