This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

F28377S Flash API support for Bank 1

Other Parts Discussed in Thread: CONTROLSUITE

The F021 Flash API used for making a bootloader in Delfino F28377S doesn't seem to support erase/write Flash bank 1 (from address 0xC0000 / Sector O), only bank 0.

The example project provided from ControlSuite only illustrates erase and write of bank 0 which I've had no trouble making work for whole bank 0. Trying to adapt the code to bank 1, however, seems to erase bank 0 instead and nothing is written to bank 1. Writing to flash bank 1 via JTAG works fine.

Does the F021 Flash API work for bank 1 at this stage, and if so, is there any example code available or is anyone able to provide any hints?

If no bank 1 Flash API support at this stage; when can one expect Flash API support for bank 1?

In the function Init_FlashBank1_Sectors() below, "Fapi_Error_InvalidBank" is returned from the function Fapi_setActiveFlashBank(Fapi_FlashBank1). The equivalent function for bank 0 (Init_Flash_Sectors()) returns success.

void Init_FlashBank1_Sectors(void)
{
	EALLOW;
	Flash1EccRegs.ECC_ENABLE.bit.ENABLE = 0x0;
	Fapi_StatusType oReturnCheck;
	oReturnCheck = Fapi_initializeAPI(F021_CPU0_BASE_ADDRESS, 200);
	if(oReturnCheck != Fapi_Status_Success){
		Flash_Error(oReturnCheck);
	}
	oReturnCheck = Fapi_setActiveFlashBank(Fapi_FlashBank1);
	if(oReturnCheck != Fapi_Status_Success){
		Flash_Error(oReturnCheck);
	}
	Flash1EccRegs.ECC_ENABLE.bit.ENABLE = 0xA;
	EDIS;
}
void Init_Flash_Sectors(void)
{
	EALLOW;
	Flash0EccRegs.ECC_ENABLE.bit.ENABLE = 0x0;
	Fapi_StatusType oReturnCheck;
	oReturnCheck = Fapi_initializeAPI(F021_CPU0_BASE_ADDRESS, 200);
	if(oReturnCheck != Fapi_Status_Success){
		Flash_Error(oReturnCheck);
	}
	oReturnCheck = Fapi_setActiveFlashBank(Fapi_FlashBank0);
	if(oReturnCheck != Fapi_Status_Success){
		Flash_Error(oReturnCheck);
	}
	Flash0EccRegs.ECC_ENABLE.bit.ENABLE = 0xA;
	EDIS;
}

  • Hi Oystein,

    You can use attached F2837xS Flash API library (Beta library and include files) and example to erase/program both Bank0 and Bank1 of F2837xS.

    Extract the flash_programming.zip to C:\ti\controlSUITE\device_support\F2837xS\v160\F2837xS_examples_Cpu1.

    Place the F021_API_F2837xS_FPU32.lib at C:\ti\controlSUITE\device_support\F2837xS\v160\F2837xS_common\lib.

    Extract the FlashAPI.zip at C:\ti\controlSUITE\device_support\F2837xS\v160\F2837xS_common\include.

    Final Flash API library and the example will be released to Controlsuite in a month.  Once the Flash API library is released in the Controlsuite, you should use the API library provided in the Controlsuite.

    Thanks and regards,F2837xS_FlashAPI.zip

    Vamsi

  • Hi Vamsi,

    Thanks for the quick reply. This solution works well!

    Regards,
    Oystein