Datasheet
Table Of Contents
- 1 Hardware Description
- 1.1 Hardware Overview
- 1.2 Analog Front End (AFE)
- 1.3 Digital Computation Engine (CE)
- 1.4 80515 MPU Core
- 1.4.1 Memory Organization and Addressing
- 1.4.2 Special Function Registers (SFRs)
- 1.4.3 Generic 80515 Special Function Registers
- 1.4.4 Special Function Registers (SFRs) Specific to the 71M6531D/F and 71M6532D/F
- 1.4.5 Instruction Set
- 1.4.6 UARTs
- 1.4.7 Timers and Counters
- 1.4.8 WD Timer (Software Watchdog Timer)
- 1.4.9 Interrupts
- 1.5 On-Chip Resources
- 1.5.1 Oscillator
- 1.5.2 Internal Clocks
- 1.5.3 Real-Time Clock (RTC)
- 1.5.4 Temperature Sensor
- 1.5.5 Physical Memory
- 1.5.6 Optical Interface
- 1.5.7 Digital I/O – 71M6531D/F
- 1.5.8 Digital I/O – 71M6532D/F
- 1.5.9 Digital IO – Common Characteristics for 71M6531D/F and 71M6532D/F
- 1.5.10 LCD Drivers – 71M6531D/F
- 1.5.11 LCD Drivers – 71M6532D/F
- 1.5.12 LCD Drivers – Common Characteristics for 71M6531D/F and 71M6532D/F
- 1.5.13 Battery Monitor
- 1.5.14 EEPROM Interface
- 1.5.15 SPI Slave Port
- 1.5.16 Hardware Watchdog Timer
- 1.5.17 Test Ports (TMUXOUT pin)
- 2 Functional Description
- 3 Application Information
- 3.1 Connection of Sensors
- 3.2 Connecting 5-V Devices
- 3.3 Temperature Measurement
- 3.4 Temperature Compensation
- 3.5 Connecting LCDs
- 3.6 Connecting I2C EEPROMs
- 3.7 Connecting Three-Wire EEPROMs
- 3.8 UART0 (TX/RX)
- 3.9 Optical Interface (UART1)
- 3.10 Connecting the V1 Pin
- 3.11 Connecting the Reset Pin
- 3.12 Connecting the Emulator Port Pins
- 3.13 Connecting a Battery
- 3.14 Flash Programming
- 3.15 MPU Firmware
- 3.16 Crystal Oscillator
- 3.17 Meter Calibration
- 4 Firmware Interface
- 4.1 I/O RAM and SFR Map – Functional Order
- 4.2 I/O RAM Description – Alphabetical Order
- 4.3 CE Interface Description
- 5 Electrical Specifications
- 5.1 Absolute Maximum Ratings
- 5.2 Recommended External Components
- 5.3 Recommended Operating Conditions
- 5.4 Performance Specifications
- 5.4.1 Input Logic Levels
- 5.4.2 Output Logic Levels
- 5.4.3 Power-Fault Comparator
- 5.4.4 Battery Monitor
- 5.4.5 Supply Current
- 5.4.6 V3P3D Switch
- 5.4.7 2.5 V Voltage Regulator
- 5.4.8 Low-Power Voltage Regulator
- 5.4.9 Crystal Oscillator
- 5.4.10 LCD DAC
- 5.4.11 LCD Drivers
- 5.4.12 Optical Interface
- 5.4.13 Temperature Sensor
- 5.4.14 VREF
- 5.4.15 ADC Converter, V3P3A Referenced
- 5.5 Timing Specifications
- 5.6 Typical Performance Data
- 5.7 71M6531D/F Package
- 5.8 71M6532D/F Package
- 5.9 Pin Descriptions
- 6 Ordering Information
- 7 Related Information
- 8 Contact Information
- Appendix A: Acronyms
- Appendix B: Revision History
FDS 6531/6532 005 Data Sheet 71M6531D/F-71M6532D/F
Rev 2 39
The MPU cannot write to flash while the CE is executing its code from flash. Two interrupts warn of collisions
between the MPU firmware and the CE timing. If a flash write operation is attempted while the CE is
busy, the flash write will not execute and the FWCOL0 interrupt will be issued. If a flash write is still in
progress when the CE would otherwise begin a code pass, the code pass is skipped, the write operation
is completed, and the FWCOL1 interrupt is issued.
The simplest flash write procedure disables the CE during the write operation and interpolates the metering
measurements. However, this results in the loss of at least one second of data, because the CE has to
resynchronize with the mains voltage.
There is a brief guaranteed interval (typically 1/32768 s) between CE executions which occurs 2520 times
per second. The start of the interval can be detected with the CE_BUSY interrupt which occurs on the
falling edge of CE_BUSY (an internal signal measurable from TMUXOUT). However, this guaranteed idle
time (30.5 µs) is too short to write a byte which takes 42 µs or to erase a page of flash memory which
takes at least 20 ms. Some CE code has substantially longer idle times, but in those cases, firmware
interrupt latencies can easily consume the available write time. If a flash write fails in this scheme, the
failure can be detected with the FWCOL0 or FWCOL1 interrupt and the write can be retried.
It is practical to pre-erase pages, disable interrupts and poll the CE_BUSY interrupt flag, IRCON[2]. This
method avoids problems with interrupt latency, but can still result in a write failure if the CE code takes to
much time. As mentioned above, polling FWCOL0 and FWCOL1 can detect write failures. However, the
speed in a polling write is only 2520 bytes per second and the firmware cannot respond to interrupts.
As an alternative to using flash, a small EEPROM can store data without compromises. EEPROM interfaces
are included in the device.
Updating Individual Bytes in Flash Memory
The original state of a flash byte is 0xFF (all ones). Once a value other than 0xFF is written to a flash
memory cell, overwriting with a different value usually requires that the cell be erased first. Since cells
cannot be erased individually, the page has to be copied to RAM, followed by a page erase. After this,
the page can be updated in RAM and then written back to the flash memory.
Flash Erase Procedures
Flash erasure is initiated by writing a specific data pattern to specific SFR registers in the proper sequence.
These special pattern/sequence requirements prevent inadvertent erasure of the flash memory.
The mass erase sequence is:
1. Write 1 to the FLSH_MEEN bit (SFR 0xB2[1]).
2. Write pattern 0xAA to FLSH_ERASE (SFR 0x94).
The mass erase cycle can only be initiated when the ICE port is enabled.
The page erase sequence is:
1. Write the page address to FLSH_PGADR[5:0] (SFR 0xB7[7:1]).
2. Write pattern 0x55 to FLSH_ERASE (SFR 0x94).
Note: Transitions to BROWNOUT mode must be avoided during page erase operations.
Bank-Switching:
The program memory of the 71M6531 consists of a fixed lower bank of 32 KB addressable at 0x0000 to
0x7FFF plus an upper bank area of 32 KB, addressable at 0x8000 to 0xFFFF. The upper 32 KB space is
banked using the I/O RAM FL_BANK register as follows:
• The 71M6531D provides 4 banks of 32 KB each selected by FL_BANK[1:0]. Note that when
FL_BANK[1:0] = 00, the upper bank is the same as the lower bank.
• The 71M6531F and 71M6532D/F provide 8 banks of 32 KB each selected by FL_BANK[2:0].
Table 38 illustrates the bank switching mechanism.