[an error occurred while processing this directive]
|
// стираем страницу
FLKEY = 0xA5; // Write flash key sequence to FLKEY
FLKEY = 0xF1; //
PSCTL = 0x03; // Enable flash erase and writes
*pwrite = 0x00; // Erase flash page using a write command
PSCTL = 0x00; // Disable flash erase and writes
// пишем кусок прошивки
for (i=0; i<512; i++)
{
CLRWDT();
FLKEY = 0xA5; // Write flash key sequence
FLKEY = 0xF1; //
PSCTL = 0x01; // Enable flash writes
*pwrite = Buf[i]; // Write data byte to flash
PSCTL = 0x00; // Disable flash writes
pwrite++;
}
E-mail: info@telesys.ru