Other Parts Discussed in Thread: TMS320F28379D, C2000WARE
Hi,
I am using TMS320F28375S-Custom board , in my application every one second once i am erasing and writing on flash sector B at location 0x82000.When i am work with same code on TMS320F28379D works well. Now i am facing the problem as after few second debugging gets off...it return a page as given bellow .
After force running getting again debug error as
After executing the EEPROM Erase function debug gets stop ,oReturnCheck return as Fapi_Status_Success.
This my code for erasing :
void EEPROM_Erase()
{
EALLOW;
oReturnCheck = Fapi_issueAsyncCommandWithAddress(Fapi_EraseSector,
(uint32 *)Bzero_SectorB_start);
while (Fapi_checkFsmForReady() != Fapi_Status_FsmReady){}
oReturnCheck = Fapi_doBlankCheck((uint32 *)Bzero_SectorB_start,
Bzero_16KSector_u32length,
&oFlashStatusWord);
if(oReturnCheck != Fapi_Status_Success)
{
Example_Error(oReturnCheck);
}
EDIS;
}
Initializing the EEPROM
void initeeprom()
{
EALLOW;
PUMPREQUEST = 0x5A5A0002;
oReturnCheck = Fapi_initializeAPI(F021_CPU0_W0_BASE_ADDRESS, 200);
if(oReturnCheck != Fapi_Status_Success)
{
Example_Error(oReturnCheck);
}
oReturnCheck = Fapi_setActiveFlashBank(Fapi_FlashBank0);
if(oReturnCheck != Fapi_Status_Success)
{
Example_Error(oReturnCheck);
}
EDIS;
}
Writing Evey one sec once:
if(Sec1>=1)
{
SeizeFlashPump_Bank0();
EEPROM_Erase();
EEPROM_ProgramSingleByte(online,1,0x82000);
Sec1=0;
ReleaseFlashPump();
}
When i am go through your previous post find an related problem , in my code interrupts(External INT, SCI, Timer) are works
behind .
Checked adding DINT,memcopy function before the erasing statement , but it doesnt work ..getting stop...
memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);
Fapi_userdefineFunctions.c file
28375S_FLASH_lnk.cmd file
MEMORY { PAGE 0: /* Program Memory */ /* Memory (RAM/FLASH/OTP) blocks can be moved to PAGE1 for data allocation */ /* Locally shared memory -- can be used by the local CPU and its CLA */ /* BEGIN is used for the "boot to SARAM" bootloader mode */ BEGIN : origin = 0x080000, length = 0x000002 RAMM0 : origin = 0x000123, length = 0x0002DD // RAMM0 : origin = 0x000080, length = 0x000380 RAMD0 : origin = 0x00B000, length = 0x000800 RAMLS03 : origin = 0x008000, length = 0x002000 /* RAMLS1 : origin = 0x008800, length = 0x000800 RAMLS2 : origin = 0x009000, length = 0x000800 RAMLS3 : origin = 0x009800, length = 0x000800 */ RAMLS4 : origin = 0x00A000, length = 0x000800 RAMGS14 : origin = 0x01A000, length = 0x001000 /* Only Available on F28379D/_, F28377D/F28377S, F28375D/F28375S devices. Remove line on other devices. */ RAMGS15 : origin = 0x01B000, length = 0x000FF8 /* Only Available on F28379D/_, F28377D/F28377S, F28375D/F28375S devices. Remove line on other devices. */ // RAMGS15_RSVD : origin = 0x01BFF8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */ RESET : origin = 0x3FFFC0, length = 0x000002 /* Flash sectors */ FLASHA : origin = 0x080002, length = 0x001FFE /* on-chip Flash */ FLASHB : origin = 0x082000, length = 0x002000 /* on-chip Flash */ FLASHC : origin = 0x084000, length = 0x002000 /* on-chip Flash */ FLASHD : origin = 0x086000, length = 0x002000 /* on-chip Flash */ FLASHE : origin = 0x088000, length = 0x008000 /* on-chip Flash */ FLASHF : origin = 0x090000, length = 0x008000 /* on-chip Flash */ FLASHG : origin = 0x098000, length = 0x008000 /* on-chip Flash */ FLASHH : origin = 0x0A0000, length = 0x008000 /* on-chip Flash */ FLASHI : origin = 0x0A8000, length = 0x008000 /* on-chip Flash */ FLASHJ : origin = 0x0B0000, length = 0x008000 /* on-chip Flash */ FLASHK : origin = 0x0B8000, length = 0x002000 /* on-chip Flash */ FLASHL : origin = 0x0BA000, length = 0x002000 /* on-chip Flash */ FLASHM : origin = 0x0BC000, length = 0x002000 /* on-chip Flash */ FLASHN : origin = 0x0BE000, length = 0x001FF0 /* on-chip Flash */ // FLASHN_RSVD : origin = 0x0BFFF0, length = 0x000010 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */ PAGE 1 : // BOOT_RSVD : origin = 0x000002, length = 0x00007E /* Part of M0, BOOT rom will use this for stack */ BOOT_RSVD : origin = 0x000002, length = 0x000121 RAMM1 : origin = 0x000400, length = 0x0003F8 /* on-chip RAM block M1 */ // RAMM1_RSVD : origin = 0x0007F8, length = 0x000008 /* Reserve and do not use for code as per the errata advisory "Memory: Prefetching Beyond Valid Memory" */ RAMD1 : origin = 0x00B800, length = 0x000800 RAMLS5 : origin = 0x00A800, length = 0x000800 RAMGS0 : origin = 0x00C000, length = 0x001000 RAMGS1 : origin = 0x00D000, length = 0x001000 CPU2TOCPU1RAM : origin = 0x03F800, length = 0x000400 CPU1TOCPU2RAM : origin = 0x03FC00, length = 0x000400 } SECTIONS { /* Allocate program areas: */ .cinit : > FLASHD PAGE = 0 .pinit : > FLASHD, PAGE = 0 .text : >> FLASHD | FLASHE PAGE = 0 codestart : > BEGIN PAGE = 0 #ifdef __TI_COMPILER_VERSION__ #if __TI_COMPILER_VERSION__ >= 15009000 GROUP { .TI.ramfunc { -l F021_API_F2837xS_FPU32.lib} } LOAD = FLASHD, RUN = RAMLS03, LOAD_START(_RamfuncsLoadStart), LOAD_SIZE(_RamfuncsLoadSize), LOAD_END(_RamfuncsLoadEnd), RUN_START(_RamfuncsRunStart), RUN_SIZE(_RamfuncsRunSize), RUN_END(_RamfuncsRunEnd), PAGE = 0 #else GROUP { ramfuncs { -l F021_API_F2837xS_FPU32.lib} } LOAD = FLASHD, RUN = RAMLS03, LOAD_START(_RamfuncsLoadStart), LOAD_SIZE(_RamfuncsLoadSize), LOAD_END(_RamfuncsLoadEnd), RUN_START(_RamfuncsRunStart), RUN_SIZE(_RamfuncsRunSize), RUN_END(_RamfuncsRunEnd), PAGE = 0 #endif #endif /* Allocate uninitalized data sections: */ .stack : > RAMM1 PAGE = 1 .ebss : > RAMLS5 PAGE = 1 .esysmem : > RAMLS5 PAGE = 1 /* Initalized sections go in Flash */ .econst : >> FLASHF | FLASHG PAGE = 0 .switch : > FLASHD PAGE = 0 .reset : > RESET, PAGE = 0, TYPE = DSECT /* not used, */ SHARERAMGS0 : > RAMGS0, PAGE = 1 SHARERAMGS1 : > RAMGS1, PAGE = 1 /* Flash Programming Buffer */ BufferDataSection : > RAMD1, PAGE = 1, ALIGN(8) /* The following section definitions are required when using the IPC API Drivers */ GROUP : > CPU2TOCPU1RAM, PAGE = 1 { PUTBUFFER PUTWRITEIDX GETREADIDX } GROUP : > CPU1TOCPU2RAM, PAGE = 1 { GETBUFFER : TYPE = DSECT GETWRITEIDX : TYPE = DSECT PUTREADIDX : TYPE = DSECT } } /* //=========================================================================== // End of file. //=========================================================================== */
1.Which one is Copy API function?(move to RAM)
2.Where i have to add?
3.where i have to call?
Thanks & regards,
Rani






