Lpc810 eeprom emulation




Дата канвертавання19.04.2016
Памер16.79 Kb.

LPC810 EEPROM Emulation.


 < The specification of the emulation program>

1. Code Size : 128Tumb Words/ 256bytes.

2. EEPROM address 15 ($00-$0E)

3. EEPROM Data Minimum 0x00000000 maximum 0x0FFFFFFF (268435455)

4. Virtual EEPROM space

2 pages of Flash Area. (64bytes x 2)

Page0:0x00000D00-0x00000D3F and Page1:0x00000D40-0x00000D7F are used

by a test program.

5. The function

(1) initial_eeprom

0xFFFFFFFF is written in EEPROM Area and it's initialized.

(2) read_eeprom

The EEPROM data of the EEPROM address designated at R1 register

is written in R2 register.

(3) write_eeprom 

The EEPROM data which was designated as the EEPROM address

designated at R1 register at R2 register is written in.

6. Use register R0,R1,R2 Register R1 and R2 are destroyed.

7. A buffer for work designates start address in a buffer for work

at R0 register, and needs 84 bytes.

When the designated price exceeded an area,

Do not write and read, rewrite R1 register and return.

read/write status ----> The EEPROM address exceeded 0x0E R1 |= 0x80

write status ----> The EEPROM data exceeded 0x0FFFFFFF R1 |= 0x40
At the time of reading, When data doesn't exist in the designated EEPROM

address, the value of R1 register is rewritten and gone back.

0x0FFFFFFF is set by R2 cashier at this time.

read status ----> There is no data in the specified EEPROM address  R1 |= 0x20

8. The data form inside the flash

EEPROM Data Format: [data31:4|address3:0]

9. Matter of the restrictions

To arrange 128 words of Page0 and Page1 in a boundary.

O  PAGE0=0x00000E00, PAGE1=0x00000E40
  X  PAGE0=0x00000E40, PAGE1=0x00000E80

O  PAGE1=0x00000E00, PAGE0=0x00000E40


  X  PAGE1=0x00000E40, PAGE0=0x00000E80

LPC810 Test circuit




  1. First EEPROM (Page0,Page1) is cleared by the i command.

Page0 is used for writing in reading certainly after i command execution.

(2) Command w05544332 which writes data in EEPROM.

writes data 0x5544332 (7 digits) in address 0x0 indicates

The register value is after writing in. (return R1,R2 value).




(3) The value of address 0x0 is read.

0x1234567 was written in address 0x0 first,

but 0x5544332 written just before is read.


(4) The once more which keeps writing notes, when I write, page 0 becomes full.



(5) The once more which keeps writing notes, when I write, page 0 becomes full.

The next data is written in.

Page0 can't be used any more,

so data of Page0 is put in order and it's copied in Page1.

Page0 is erased. Price 0xccccccc of address 0x4 written in just before

is written in Page1.

(6) The next data is written in. Page1 is used as after virtual EEPROM space.

Data 0x2345678 of address 0x0 is written in Page1.

When Page1 becomes full, It move the data of Page1 to Page0,

and after Page1 is erased, this is repeated.

A loss of data isn't by the process of the movement because

the size in Page is always bigger than the permitted address.


(7) The next data is written in. Page1 is used as after virtual EEPROM space.

It's initialized again in the end and the movement of erasure is reconfirmed.





База данных защищена авторским правом ©shkola.of.by 2016
звярнуцца да адміністрацыі

    Галоўная старонка