12.07.2015 Views

ATmega32A Datasheet - Sunrom Technologies

ATmega32A Datasheet - Sunrom Technologies

ATmega32A Datasheet - Sunrom Technologies

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>ATmega32A</strong>7.4 EEPROM Data MemoryThe Atmel ® AVR ® <strong>ATmega32A</strong> contains 1024bytes of data EEPROM memory. It is organized asa separate data space, in which single bytes can be read and written. The EEPROM has anendurance of at least 100,000 write/erase cycles. The access between the EEPROM and theCPU is described in the following, specifying the EEPROM Address Registers, the EEPROMData Register, and the EEPROM Control Register.“Memory Programming” on page 267 contains a detailed description on EEPROM Programmingin SPI, JTAG, or Parallell Programming mode.7.4.1 EEPROM Read/Write AccessThe EEPROM Access Registers are accessible in the I/O space.The write access time for the EEPROM is given in Table 7-1 on page 22. A self-timing function,however, lets the user software detect when the next byte can be written. If the user code containsinstructions that write the EEPROM, some precautions must be taken. In heavily filteredpower supplies, V CC is likely to rise or fall slowly on Power-up/down. This causes the device forsome period of time to run at a voltage lower than specified as minimum for the clock frequencyused. See “Preventing EEPROM Corruption” on page 19 for details on how to avoid problems inthese situations.In order to prevent unintentional EEPROM writes, a specific write procedure must be followed.Refer to the description of the EEPROM Control Register for details on this.When the EEPROM is read, the CPU is halted for four clock cycles before the next instruction isexecuted. When the EEPROM is written, the CPU is halted for two clock cycles before the nextinstruction is executed.7.4.2 EEPROM Write During Power-down Sleep ModeWhen entering Power-down Sleep mode while an EEPROM write operation is active, theEEPROM write operation will continue, and will complete before the Write Access time haspassed. However, when the write operation is completed, the Oscillator continues running, andas a consequence, the device does not enter Power-down entirely. It is therefore recommendedto verify that the EEPROM write operation is completed before entering Power-down.7.4.3 Preventing EEPROM CorruptionDuring periods of low V CC, the EEPROM data can be corrupted because the supply voltage istoo low for the CPU and the EEPROM to operate properly. These issues are the same as forboard level systems using EEPROM, and the same design solutions should be applied.An EEPROM data corruption can be caused by two situations when the voltage is too low. First,a regular write sequence to the EEPROM requires a minimum voltage to operate correctly. Secondly,the CPU itself can execute instructions incorrectly, if the supply voltage is too low.8155C–AVR–02/1119

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!