Xfer_busy interrupt – Maxim Integrated 71M6513H Power Meter IC Family Software User Manual

Page 50

Advertising
background image

71M651x Software User’s Guide

BEGIN_CE_CRITICAL

_SECTION

ce_busy_isr()

sag_data = *((U08x

*)&cestatus);

Disable CE interrupts

stretch clock 6 times

Normal clock

execute Timer expired

function.

(sag_data & 0x0E) !=

0

CE =

(CE2&~CHOP_EN)|CHOP_EN

#ifdef SAGDETECT

CLK_STRETCH

CLK_RELAX

read CE status

END_CE_CRITICAL

_SECTION

user SAG handling code

sag_data = 0

EX_CE_BUSY = 0

EX_CE_BUSY = 0

END

N

N

disable interrupt

disable interrupt

Figure 5-8: CE_BUSY ISR

XFER_BUSY Interrupt

XFER Busy interrupt is requested by the CE at the conclusion of every accumulation cycle. The interrupt service
routine copies the CE output data to the MPU data RAM for further processing by the MPU, which is performed by the
background task. The handling of data for the generation of pulses is also managed in this ISR.

XFER_Busy waits until the second interrupt after one second has elapsed, since it takes roughly one second for the
PLL in the CE to settle and (therefore) for the filtering to be reliable.

The copy operations CE  X and X  CE stated in the flow chart are implemented with the memcpy_cex() and
memcpy_xce() routines, which move data between XRAM and CE DRAM or vice versa. Due to the wait states that
apply to accesses of CE DRAM, this operation cannot be done directly. Using memcpy_cex(), data is moved from
XRAM to CE DRAM, with memcpy_xce(), data is moved from CE DRAM to XRAM.

Revision 2.4

TERIDIAN Proprietary

50 of 137

© Copyright 2005-2006 TERIDIAN Semiconductor Corporation

Advertising