
Flash Development Toolkit
Method for Using the User Program Mode (SH7086 Application)
REJ06J0071-0100 /Rev.1.00 2009.2 Page 93 of 106
6.3 RAM Main Process
The RAM main process involves transferring a library, erasing the flash memory, and writing to the flash
memory. These processes are executed in the RAM.
(1) Library transfer (FDTUMain.c)
• LibTrans
If commandID is prepareERASE (0x48), set FECS to EraseMode (0x01) and select the erase library.
Otherwise (prepareUserAreaWrite, 0x43), set FPCS to WriteMode (0x01) and select the write library. Set
FKEY to FkeyEnable (0xA5) to select Transfer and then set the SCO bit.
/*
///////////////////////
// LibTrans Function //
///////////////////////
*/
void LibTrans(BYTE commandID)
{
if (commandID == prepareErase){
FECS = EraseMode;
}else{
FPCS = WriteMode;
}
FKEY = FkeyEnable;
ScoBitSet();
}
Comentarios a estos manuales