
Flash Development Toolkit
Method for Using the User Program Mode (SH7086 Application)
REJ06J0071-0100 /Rev.1.00 2009.2 Page 97 of 106
(4) Flash memory write (FDTWrite.c)
• WriteInit
Select the user area and after specifying the operating clock frequency, initialize the write library.
/*
////////////////////////
// WriteInit Function //
////////////////////////
*/
BYTE WriteInit(void)
{
InitPtr WRITE_INIT = (InitPtr)INIT_ADDR;
FKEY = WRITE_ERASE_ENABLE;
return ((*WRITE_INIT)(Frequency,0));
}
• WriteStart
After specifying the address where the data to write is stored and the address to which to write, call the
write library.
The write data and the write destination address are received from the Flash Development Toolkit. For
details, refer to the sources of the files for user program mode.
/*
/////////////////////////
// WriteStart Function //
/////////////////////////
*/
BYTE WriteStart(BYTE *data, DWORD adr)
{
WritePtr WRITE_DATA = (WritePtr)WRITE_ERASE_ADDR;
return ((*WRITE_DATA)((BYTE *)data, (BYTE *)adr));
}
Comentarios a estos manuales