TC1796
Peripheral Units (Vol. 2 of 2)
Analog-to-Digital Converter (ADC)
User’s Manual
25-30
V2.0, 2007-07
ADC, V2.0
•
Channel arbitration
follows after source arbitration. For the winning source, channel
arbitration is performed. Within the second stage of the arbitration algorithm, the
pending conversion request with the highest priority is detected. If a parallel source
is the winning source, the flag representing the highest channel number within the
conversion request pending register is determined. If a sequential source is the
winning source, the channel in the request register or in the back-up register is
determined. Note that a pending request in the back-up register is preferred.
The arbitration result consists of the winning source and channel number. A start of
conversion can occur, if the A/D Converter is idle or if the arbitration winner has
permission to cancel a currently running conversion. After the conversion has started,
the corresponding pending conversion request is automatically reset. Attempt to start a
conversion for this arbitration result will be repeated until either the start is successful
(other conversion is currently running) or a new result (source and channel number with
a higher priority) was arbitrated.
25.1.3.1 Source Arbitration Level
The priority of each conversion request source can be programmed individually in the
corresponding bit fields of the source arbitration level register SAL. The priority of a
source is named as source arbitration level and it determines the order in which pending
conversion requests from different sources are performed. A low number of the source-
arbitration-level represents a high priority and vice versa.
After initialization, an individual source arbitration level is assigned to each source.
“Channel Injection” has the highest priority, while “Auto-Scan” has the lowest priority.
These predefined priority levels can be reprogrammed to adapt the ADC’s functionality
to the requirements of the application.
It is recommended that source arbitration levels should be reprogrammed while no
conversion request is pending, as any modification of the source arbitration level register
immediately affects the arbitration scheme. Each source should have an individual
priority level. Nevertheless, if several conversion request sources have been
programmed to the same priority level, the first detected source within this group of
identical levels is taken into account.
25.1.3.2 Arbitration Participation Flags
Each source has an arbitration participation flag located in the arbitration participation
register AP. An arbitration participation flag set to 1 indicates, that at least one
conversion request has been generated by this source and that this source participates
in the arbitration.
An arbitration participation flag is automatically cleared by hardware if no conversion
request is pending for this source (if all requested conversions have been started).