Other Parts Discussed in Thread: C2000WARE, TMS320F28375S
Dear Mr. Vamsi,
We have updated custom board version replace with TMS320F28384D and succeed example program , loaded data in CPU1-flash memory sector6 (0x98000) using example flash program from driver lib. C:\ti\c2000\C2000Ware_3_04_00_00\driverlib\f2838x\examples\c28x\flash (it stored data successfully using flash api).
But in f28375s(eeprom emulation ) we developed to stored data in 0x82000 and 0x84000 location. while READ and Write data in 0x82000 and 0x84000 location in f28384d it shows errors while loading program ?
Our Flash related previous query.
Our custom board version1.0 , we have used tms320f28375s and stored,erased data successfully .
our current requirement we have replaced f28384d and ported EEPROM.c and EEPROM.h for flash but it is not store data.
we have ported from 75s to 84d and attached files here for your reference ..kindly confirm the changes in eeprom files for f28384d to read wirte data in flash.
Following changes in functions:
f28375s-working code
void EEPROM_ProgramSingleByte1(Uint16 data[], Uint16 a, Uint16 write_address)
{
int ref;
for( ref=0;ref<255;ref++)
Write_Buffer1[ref]=0;
Uint16 i=0;
Uint16 sec=0;
uint32 u32Index=0;
EALLOW;
PUMPREQUEST = 0x5A5A0002;
SeizeFlashPump_Bank0();
Flash0EccRegs.ECC_ENABLE.bit.ENABLE = 0x0;
for(i=0;i<a;i++)
Write_Buffer1[i] = data[i]; // Prepare data to be programmed
Flash0EccRegs.ECC_ENABLE.bit.ENABLE = 0x0;// Set Length for programming
for(sec=0,u32Index=write_address; (u32Index < (write_address+a)) &&
(oReturnCheck == Fapi_Status_Success);sec+=8,u32Index+=8)
{
oReturnCheck=Fapi_issueProgrammingCommand((uint32 *)(u32Index), Write_Buffer1+sec,
8,
0,
0,
Fapi_DataOnly);
}
ReleaseFlashPump();
EDIS;
}
f28384d- not working
void EEPROM_ProgramSingleByte1(uint16 data[], uint16 a, uint16 write_address)
{
int ref;
for( ref=0;ref<255;ref++)
Write_Buffer1[ref]=0;
uint16 i=0;
uint16 sec=0;
uint32 u32Index=0;
EALLOW;
PUMPREQUEST = 0x5A5A0002;
Flash_claimPumpSemaphore(FLASH_CPU1_WRAPPER);
Flash_enableECC( FLASH0ECC_BASE);
for(i=0;i<a;i++)
Write_Buffer1[i] = data[i]; // Prepare data to be programmed
// Flash0EccRegs.ECC_ENABLE.bit.ENABLE = 0x0;// Set Length for programming
Flash_enableECC( FLASH0ECC_BASE);
for(sec=0,u32Index=write_address; (u32Index < (write_address+a)) &&
(oReturnCheck == Fapi_Status_Success);sec+=8,u32Index+=8)
{
oReturnCheck=Fapi_issueProgrammingCommand((uint32 *)(u32Index), Write_Buffer1+sec,
8,
0,
0,
Fapi_DataOnly);
}
Flash_releasePumpSemaphore();
EDIS;
}
Difference between two project file is
(f28375s-it is dual headers file ,the function have both bit field and driverlib)
PUMPREQUEST = 0x5A5A0002;
SeizeFlashPump_Bank0();
Flash0EccRegs.ECC_ENABLE.bit.ENABLE = 0x0;
ReleaseFlashPump();
(f28384d- we ported the same function using driverlib, kindly guide us for our problem.
PUMPREQUEST = 0x5A5A0002;
Flash_claimPumpSemaphore(FLASH_CPU1_WRAPPER);
Flash_enableECC( FLASH0ECC_BASE);
Flash_releasePumpSemaphore();
We used same flash example "2838x_flash_api_lnk.cmd file"
Thanks & Regards,
Shriram J