IP2022 Users ManualInstruction Set Architecture
www.ubicom.com
147
FWRITE
Write into Flash Memory
Operation:
(ADDRX || ADDRH || ADDRL) = DATAH || DATAL
Bits affected:
FBUSY bit in the XCFG register
Opcode:
0000 0000 0001 1010
Description:
This instruction writes a word of data to program
flash memory from data memory. The 24-bit
ADDRX/ADDRH/ADDRL register specifies the
address of a 16-bit word in program memory
which is loaded with the contents of the
DATAH/DATAL register. If the address is not in
program flash memory, no operation
is
performed. The instruction is non-blocking (i.e.
other instructions may execute before the write
operation is complete).
After executing this instruction, the FBUSY bit in
the XCFG register is set. When the write
operation is complete, the FBUSY bit goes clear.
This instruction must not be executed if the
FBUSY bit is already set from a previous fread,
fwrite, or ferase instruction. Program
execution out of flash memory is not possible
while the FBUSY bit is set, therefore this