
301
12.5 Conversion Data Protection Function
The A/D converter has a conversion data protection function. This function uses the
DMAC to enable continuous conversion and saving of multiple data items.
s Conversion Data Protection Function
Because there is only one conversion data register, continuous A/D conversion can result in the
loss of the previously stored data item when the new conversion result is stored at the end of a
conversion operation.
To protect the previous data, the A/D converter has a function for
temporarily stopping A/D conversion without storing the conversion data to the register. A/D
conversion is stopped until the previous data item has been transferred to memory using the
DMAC even if the A/D converter has completed conversion.
The temporary stop is released after the previously stored data item has been transferred to
memory by DMA transfer.
If the previously stored data item has been transferred, the A/D converter can continue
conversion without performing a temporary stop.
Note:
This function is related to the ADCS INT and INTE bits.
The data protection function operates only in interrupt enable state (INTE = 1).
The data protection function will not operate in interrupt prohibited state (INTE = 0).
If
continuous A/D conversion is performed in this state, the conversion data will be stored
continuously to the register and earlier stored data items will be lost.
In addition, if DMA transfer is not used in interrupt enable state (INTE = 1), the INT bit will not
be cleared and the data protection function will set A/D conversion to temporary stop state.
In this case, clearing the INT bit in the interrupt sequence will release the stop state.
During DMA operation, A/D converter operations can change the contents of the conversion
data register to change before data is transferred. This applies if interrupts are prohibited
when the A/D converter is stopped temporarily.
In addition, the previously stored data item will be overwritten if the A/D converter is restarted
during a temporary stop.
Figure 12.5-1 "Flow of Operation of the Data Protection Function when DMA Transfer is Used"
shows the flow of operation of the data protection function when DMA transfer is used.