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

16-bit advanced control timer (TIM1)

RM0016

 

 

When the timer is configured in encoder interface mode, it provides information on the current position of the sensors. Dynamic information, such as speed, acceleration, and slowdown, can be obtained by measuring the period between two encoder events using a second timer configured in capture mode. The output of the encoder, which indicates the mechanical zero, can be used for this purpose. Depending on the time between two events, the counter can also be read at regular intervals. This can be done by latching the counter value into a third input capture register, if one is available. In this case, the capture signal must be periodic and can be generated by another timer.

17.6TIM1 interrupts

TIM1 has eight interrupt request sources, mapped on 2 interrupt vectors:

Break interrupt

Trigger interrupt

Commutation interrupt

Capture/compare 4 interrupt

Capture/compare 3 interrupt

Capture/compare 2 interrupt

Capture/compare 1 interrupt

Update interrupt (example: overflow, underflow, and counter initialization)

To use the interrupt features for each interrupt channel used, set the desired interrupt enable bits (BIE, TIE, COMIE, CCiIE, and UIE) in the TIM1_IER register to enable interrupt requests.

The different interrupt sources can also be generated by software using the corresponding bits in the TIM1_EGR register.

184/454

Doc ID 14587 Rev 9

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