Hi,
I am trying to develop an application to perform Flash operations for F2812 target with Parallel Port using Commandline mode.
When i use the SDFlash Utilty (SDFlash.exe) directly, there were no issues in performing Flash operations for F2812 target using Parallel Port.
But my application is unable to Disable the Watchdog, and i get the Error : "Failed to Disable the Watchdog". I guess it has something to do with not executing EALLOW and EDIS before the protected regiters are accessed.
The following below is the code snippet for Disable watchdog :-
BOOL Disable_WD() { BOOL Success; MEM_TADDR Addr; TREG_16 Data; /* Enable WD override */ //*0x7029 = *0x7029 | 0x0068; //*0x7025 = 0x0055; //*0x7025 = 0x00AA; Addr = 0x7029; Success = T28x->ReadMemory( Addr, M_DATA, &Data, 1 ); if( Success == FALSE ) return( FALSE ); Data |= 0x0068; Success = T28x->WriteMemory( Addr, M_DATA, &Data, 1 ); if( Success == FALSE ) return( FALSE ); Addr = 0x7025; Data = 0x0055; Success = T28x->WriteMemory( Addr, M_DATA, &Data, 1 ); if( Success == FALSE ) return( FALSE ); Data = 0x00AA; Success = T28x->WriteMemory( Addr, M_DATA, &Data, 1 ); return( Success ); }
The following piece of code does not seem to disable the watchdog in F2812 during a cold restart (Power OFF and Power ON). The function "T28x->ReadMemory" returns FALSE as it is unable to read the address
0x7029.But once the SDFlash utlity was used to Erase, Program and Verify the DSC, the above code does seem to disable the watchdog. That is, when i use my commandline mode application, for the second time after the SDFlash Utility, this disabling of watchdog works.
Waiting for response from anyone.
Thanks & Regards, Marcos.