Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
87
Добавлен:
01.03.2016
Размер:
3.56 Mб
Скачать

Analog/digital converter (ADC)

RM0016

 

 

24.6ADC low power modes

Table 73. Low power modes

Mode

Description

 

 

Wait

No effect on ADC

 

 

 

In devices with extended features, the ADC is automatically switched off

Halt/

before entering Halt/Active-halt mode. After waking up from Active-halt, the

Active-halt

ADON bit must be set by software to power on the ADC, and a delay of 7 µs

 

is needed before starting a new conversion.

 

 

The ADC does not have the capability to wake the device from Active-halt or Halt mode.

24.7ADC interrupts

The ADC interrupt control bits are summarized in Table 74, Table 75 and Table 76

Table 74. ADC Interrupts in single and non-buffered continuous mode (ADC1 and ADC2)(1)

Enable bits

 

 

Status flags

 

 

 

 

 

 

 

 

 

 

Exit

Exit

AWDENx

AWDIE

 

 

 

 

 

 

EOCIE

AWSx

AWDG

EOC

from

from

 

Wait

Halt

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Flag is set if the channel

Flag is set at the end of

 

 

 

0

 

0

 

crosses the

No

No

 

 

 

each conversion.

 

 

 

 

 

programmed thresholds.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Flag is set if the channel

Flag is set at the end of

 

 

 

0

 

1

 

crosses the

each conversion and an

Yes

No

 

 

 

 

 

programmed thresholds.

interrupt is generated.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Flag is set if the channel

 

 

 

 

 

 

 

 

crosses the

 

 

 

Don’t

1

 

0

Don’t care

programmed thresholds.

Flag is set at the end of

Yes

No

care

 

An interrupt is

each conversion.

 

 

 

 

generated but

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

continuous conversion

 

 

 

 

 

 

 

 

is not stopped.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Flag is set if the channel

 

 

 

 

 

 

 

 

crosses the

 

 

 

 

 

 

 

 

programmed thresholds.

Flag is set at the end of

 

 

 

1

 

1

 

An interrupt is

each conversion and an

Yes

no

 

 

 

 

 

generated but

interrupt is generated.

 

 

 

 

 

 

 

continuous conversion

 

 

 

 

 

 

 

 

is not stopped.

 

 

 

 

 

 

 

 

 

 

 

 

1. BSIZE = Data buffer size (8 or 10 depending on the product).

422/454

Doc ID 14587 Rev 9

RM0016

 

 

 

Analog/digital converter (ADC)

 

 

 

 

 

 

 

 

Table 75. ADC interrupts in buffered continuous mode (ADC1)

 

 

 

 

 

 

 

 

 

 

 

 

 

Enable bits

 

 

Status flags

 

Exit

Exit

 

 

 

 

 

 

 

 

AWENx

 

AWDIE

 

EOCIE

AWSx

AWD

EOC

from

from

 

 

 

 

 

 

 

 

 

 

Wait

Halt

 

 

 

 

 

 

 

 

 

 

0

 

Don’t

 

0

0

 

The flag is set at the end

No

No

 

care

 

 

of BSIZE conversions

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Don’t

 

 

 

0

The flag is set at the end

 

 

0

 

 

1

0

 

of BSIZE conversions

Yes

No

 

care

 

 

and an interrupt is

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

generated.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The flag is set at the end

 

 

 

1

 

0

 

0

 

of BSIZE conversions if

 

No

No

 

 

 

at least one of the

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

AWSx bits is set

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The flag is set and an

The flag is set at the end

 

 

 

 

 

 

 

 

interrupt is generated at

of BSIZE conversions

 

 

 

 

 

 

 

 

the end of BSIZE

(Data Buffer Full)

 

 

1

 

1

 

0

 

conversions if at least

 

Yes

No

 

 

 

one of the AWSx bits is

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Flag is set if conversion

set. Continuous

 

 

 

 

 

 

 

 

conversion is not

 

 

 

 

 

 

 

 

on buffer ”x” crosses the

 

 

 

 

 

 

 

 

stopped.

 

 

 

 

 

 

 

 

thresholds programmed

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

in the ADC_HTR and

The flag is set at the end

The flag is set at the end

 

 

 

 

 

 

 

ADC_LTR registers

 

 

1

 

0

 

1

of BSIZE conversions if

of BSIZE conversions

Yes

No

 

 

 

 

 

 

at least one of the

and an interrupt is

 

 

 

 

 

 

 

 

 

 

 

 

 

 

AWSx bits is set

generated.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The flag is set

 

 

 

 

 

 

 

 

 

immediately as soon as

The flag is set at the end

 

 

 

 

 

 

 

 

one of the AWSx bits is

of BSIZE conversions

 

 

1

 

1

 

1

 

set. In interrupt is

Yes

No

 

 

 

and an interrupt is

 

 

 

 

 

 

generated and

 

 

 

 

 

 

 

 

generated.

 

 

 

 

 

 

 

 

continuous conversion

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

is stopped.

 

 

 

 

 

 

 

 

 

 

 

 

 

Doc ID 14587 Rev 9

423/454

Analog/digital converter (ADC)

 

 

RM0016

 

 

 

 

 

 

 

 

 

Table 76.

ADC interrupts in scan mode (ADC1)

 

 

 

 

 

 

 

 

 

 

 

 

 

Control bits

 

Status bits

 

Exit

Exit

 

 

 

 

 

 

 

 

AWENx

 

AWDIE

 

EOCIE

AWSx

AWD

EOC

from

from

 

 

 

 

 

 

 

 

 

 

Wait

Halt

 

 

 

 

 

 

 

 

 

 

0

 

Don’t

 

0

0

0

The flag is set at the end

No

No

 

care

 

of the scan sequence

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The flag is set at the end

 

 

0

 

Don’t

 

1

0

0

of the scan sequence

Yes

No

 

care

 

and an interrupt is

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

generated.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The flag is set at the end

 

 

 

1

 

0

 

0

 

of the scan sequence if

The flag is set at the end

No

No

 

 

 

at least one of the

of the scan sequence

 

 

 

 

 

 

 

 

 

 

 

 

 

 

AWSx bits is set

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The flag is set and an

 

 

 

 

 

 

 

 

 

interrupt is generated at

 

 

 

 

 

 

 

 

 

the end of the SCAN

The flag is set to 1 at the

 

 

1

 

1

 

0

Flag is set if conversion

sequence if at least one

end of the scan

Yes

No

 

 

 

 

 

of the AWSx bits is set.

sequence

 

 

 

 

 

 

 

on channel ”x” crosses

SCAN conversion is not

 

 

 

 

 

 

 

 

the thresholds

stopped.

 

 

 

 

 

 

 

 

programmed in the

 

 

 

 

 

 

 

 

 

The flag is set at the end

The flag is set to 1 at the

 

 

 

 

 

 

 

ADC_HTR and

 

 

1

 

0

 

1

ADC_LTR registers

of the scan sequence if

end of the scan

Yes

No

 

 

 

at least one of the

sequence and an

 

 

 

 

 

 

 

 

 

 

 

 

 

 

AWSx bits is set

interrupt is generated.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The flag is set

 

 

 

 

 

 

 

 

 

immediately as soon as

The flag is set at the end

 

 

1

 

1

 

1

 

one of the AWSx bits is

of the scan sequence

Yes

No

 

 

 

set. In interrupt is

and an interrupt is

 

 

 

 

 

 

 

 

 

 

 

 

 

 

generated and scan

generated.

 

 

 

 

 

 

 

 

conversion is stopped.

 

 

 

 

 

 

 

 

 

 

 

 

 

424/454

Doc ID 14587 Rev 9

Соседние файлы в папке Минимум документации STM8