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.
GpioDataRegs.GPADAT.bit.GPIO24 = 0;
Status = Example_CsmUnlock();
if(Status != STATUS_SUCCESS)
{
Example_Error(Status);
}
EALLOW;
Flash_CPUScaleFactor = SCALE_FACTOR;
EDIS;
EALLOW;
Flash_CallbackPtr = &MyCallbackFunction;
EDIS;
MyCallbackCounter = 0; // Increment this counter in the callback function
// Jump to SARAM and call the Flash API functions
Example_CallFlashAPI();
GpioDataRegs.GPADAT.bit.GPIO24 = 1;
}
#pragma CODE_SECTION(Example_CallFlashAPI,"ramfuncs");
void Example_CallFlashAPI(void)
{
Uint16 i;
Uint16 Status;
Uint16 *Flash_ptr; // Pointer to a location in flash
Uint32 Length; // Number of 16-bit values to be programmed
float32 Version; // Version of the API in floating point
Uint16 VersionHex; // Version of the API in decimal encoded hex
Version = Flash_APIVersion();
if(Version != (float32)1.00)
{
Flash_Status=Version;
Flash_Result=2;
return;
}
// Example: Erase Sector B - Sector H
// Sectors A has example code so leave them unerased
// SECTORA-SECTORH are defined in Flash2803x_API_Library.h
Status = Flash_Erase((SECTORB),&FlashStatus);
if(Status != STATUS_SUCCESS)
{
Example_Error(Status);
Flash_Result=3;
return;
}