Тема: FAQ по STM8
Показать сообщение отдельно
Непрочитано 12.08.2011, 15:40   #84
st_1
Заблокирован
 
Регистрация: 26.12.2009
Сообщений: 3,124
Сказал спасибо: 116
Сказали Спасибо 867 раз(а) в 614 сообщении(ях)
st_1 на пути к лучшему
По умолчанию Re: FAQ по STM8

17.5 TIM1 capture/compare channels
The capture/compare block is made of one preload register and one shadow register. Write
and read always access the preload register. In capture mode, captures are made in the
shadow register, which is copied into the preload register. In compare mode, the content of
the preload register is copied into the shadow register which is compared to the counter.
When the channel is configured in output mode (CCiS = 00 in the TIM1_CCMRi registers),
the TIM1_CCRi registers can be accessed without any restriction.

17.5.1 Write sequence for 16-bit TIM1_CCRi registers
16-bit values are loaded in the TIM1_CCRi registers through preload registers. This must
be performed by two write instructions, one for each byte. The MS byte must be written first.
The shadow register update is blocked as soon as the MS byte has been written, and stays
blocked until the LS byte is written. Do not use the LDW instruction, as this writes the LS
byte first, and produces incorrect results in this case.

RM0016
Reference manual

Последний раз редактировалось st_1; 12.08.2011 в 15:48.
st_1 вне форума   Ответить с цитированием
Сказали "Спасибо" st_1
SasaVitebsk (13.08.2011)