Mikroelektronika MIKROE-738 Datenbogen

Seite von 682
322
mikoC PRO for PIC32
MikroElektronika
Flash Memory Library
This library provides routines for accessing microcontroller’s (internal) Flash memory.
The program Flash array for the PIC32MX device is built up of a series of rows. A row contains 128 32-bit instruction 
words or 512 bytes. A group of 8 rows compose a page; which, therefore, contains 8 × 512 = 4096 bytes or 1024 
instruction words.
A page of Flash is the smallest unit of memory that can be erased at a single time. The program Flash array can be 
programmed in one of two ways: 
 
- Row programming, with 128 instruction words at a time. 
 
- Word programming, with 1 instruction word at a time. 
The CPU stalls (waits) until the programming operation is finished. The CPU will not execute any instruction, or respond 
to interrupts, during this time. If any interrupts occur during the programming cycle, they remain pending until the cycle 
completes.
Library Routines
 
- Flash_Write_Word 
 
- Flash_Write_Row 
 
- Flash_Erase_Page