
MB91460P Series
DS07-16615-2E
63
If a conversion is finished and the data of the previous conversion has not been read out before, previous data
would be overwritten. To avoid this problem, the next conversion data is not stored in the data registers until the
previous value has been read out (e.g. by DMA). A/D conversion halts during this time and the PAUS flag is set.
A/D conversion restarts when the ADC interrupt flag ADCR1.INT is cleared.
The register protection function depends on the conversion mode and the setting of ADCR2.INTE2:
6.6.1.
Protection of ADCD0...31
In continuous mode with INTE2==1, PAUS is set when data of the start channel (set by ADSCH) is ready for
writing to the registers, but IRQ2 (End of Scan interrupt) is already active.
Example: Start channel =4, end channel=7, continous mode, ADCS1.INTE=0, ADCS2.INTE2=1
Start by CPU --> convert channel 4 + safe data to ADCD4,
convert channel 5 + safe data to ADCD5,
convert channel 6 + safe data to ADCD6,
convert channel 7 + safe data to ADCD7 ---> End of Scan interrupt (IRQ2),
convert channel 4 + set PAUS (protect ADCD4...7).
After the CPU or DMA have read the data registers and cleared IRQ2, the scan conversion continues.
6.6.2.
Protection of ADCR
In the other modes or if INTE2==0, PAUS is set when data of any channel is ready for writing to the registers,
but IRQ (End of Conversion) is active. Because in this mode the protection function is active after each single
conversion, the ADCR register is protected.
7.
ADC Interrupt Generation and DMA Access
There are 2 ADC interrupt sources: End of Conversion and End of Scan.
7.1.
End of Conversion
The End of Conversion (EoC) interrupt is enabled by ADCS1.INTE bit and is compatible to the A/D converts in
old devices of MB91460 series. If EoC is enabled, it appears after any conversion cycle. It is recommended to
use DMA transfer to read out the data from ADCR.
7.2.
End of Scan
The End of Scan (EoS) interrupt is enabled by ADCS2.INTE2 bit. If EoS is enabled, it appeares after the
conversion of the end channel, which is defined by the setting of ADECH register.
If the End of Conversion interrupt is enabled in parallel, both interrupt bits are set. In this case it is recommended
that the interrupt routine reads out ADCS2 register (containing mirrored bits of ADCS1[7:4]) to check where the
interrupt comes from.
7.3.
DMA Transfer
DMA transfer can be triggered by End of Conversion interrupt or by End of Scan interrupt. The interrupts are
assigned to separate DMA resource numbers (please refer to the Interrupt Vector Table).
The automatic interrupt clear after DMA transfer works for End of Conversion and for End of Scan separately.
Mode
INTE2
Function
Single, Stop
X
Protection of ADCR
Continuous
0
Protection of ADCR
1
Protection of ADCD0...ADCD31