The MC9S12XE family of microcontrollers comes with unique flash memory called D-Flash that can be allocated for Emulated EEPROM (EEE) which mimics the small sector size and endurance of real eeprom. Before you can program the D-Flash or EEE, the D-Flash must be configured with the "Full Partition" command PROG12Z. The size of the D-Flash on the MC9S12XE can be up to 32KB or 128 sectors of 256 bytes each. You can allocate up to 4KB or 16 pages of 256 bytes each to be used for EEE. Please see Freescale application note AN3490 for a more detailed overview of the EEE implementation. There are two parameters that control how the software configures the memory: DFPART and ERPART. DFPART = Number of D-Flash sectors reserved as User D-flash (128 total) ERPART = Number of pages reserved for EEE (16 total) The two parameters are required to meet two size conditions to be valid: 1. (128-DFPART) / ERPART >= 8 2. (128-DFPART) >= 12 if ERPART==1 Examples: "80 00" - Enables 128 sectors (32 KB) of D-Flash and 0 pages of EEE "20 0C" - Enables 32 sectors (8 KB) of D-Flash and 12 pages (3 KB) of EEE "10 0C" - Enables 16 sectors (4 KB) of D-Flash and 12 pages (3 KB) of EEE "00 10" - Enables 0 sectors of D-Flash and 16 pages (4 KB) of EEE Unused part of EEE read as random data! Порядок записи процессора: Часть D-FLASH в данном процессоре может быть отдана под эмуляцию EEPROM. 1. На образце, который нужно скопировать, считываем все 3 области. Также сделать команду Query EEE и запомнить значения. 2. Cтереть полностью опытный процессор. 3. Сделать unsecure. 4. Записать запомненные по команде Query EEE значения с помощью команды Partition EEE. 5. Записать P-FLASH. 6. Записать D-FLASH. Запись может пройти не полностью, а только до начала области эмуляции. Это нормально. 7. Записать EEE. Начальная часть EEE может содержать область ОЗУ и при верификации будет выдавать несовпадения. Это не является ошибкой.