Tool/software: TI-RTOS
Hello,
I am using Flash API V2.10 to execute Flash operations on TMS320F28335.
I use Flash_CallbackPtr to feed watchdog and to send a CAN message as a keep alive.
This is my callback function:
#pragma CODE_SECTION(Flash_Callback,"ramfuncs");
void Flash_Callback(void)
{
static Uint16 j= 0;
byte _p_Data[2]= {1,0}; //Erasing
EALLOW;
SysCtrlRegs.WDKEY = 0x55; /* serve watchdog #1 */
SysCtrlRegs.WDKEY = 0xAA; /* and serve watchdog #2 */
EDIS;
j++;
if(j>13900)
{
CanSendMessage(0x19D0133A, 0, _p_Data); //in ram
j= 0;
}
}
When the program calls to the Flash28335_Erase function the program executes the erasing and the callback (CAN message is sent). After the erasing has finished, the program execution goes I don't know where but it is not halted. After some time, the DSP is restarted.
If I suspend the execution before the restart, I always see this:
Moreover, after some investigations, I could see that declaring p_Data[2] as static solves the problem, the program execution after the erasing is normal. It doesn’t make sense to me and I guess that the real problem if somewhere else. Could you help me?
This is the development environment:
DSP: TMS320DSP28335
Compiler: 6.2.5
XDCTools: 3.30.4.52
SYS/BIOS: 6.41.0.26
CCS: v6.1
Regards,
Paloma




