поискавой системы для электроныых деталей
  Russian  ▼
ALLDATASHEETRU.COM

X  

AN4539 датащи(PDF) 7 Page - STMicroelectronics

номер детали AN4539
подробное описание детали  HRTIM cookbook
PDF  33 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
производитель  STMICROELECTRONICS [STMicroelectronics]
домашняя страница  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN4539 датащи(HTML) 7 Page - STMicroelectronics

Back Button AN4539 Datasheet HTML 3Page - STMicroelectronics AN4539 Datasheet HTML 4Page - STMicroelectronics AN4539 Datasheet HTML 5Page - STMicroelectronics AN4539 Datasheet HTML 6Page - STMicroelectronics AN4539 Datasheet HTML 7Page - STMicroelectronics AN4539 Datasheet HTML 8Page - STMicroelectronics AN4539 Datasheet HTML 9Page - STMicroelectronics AN4539 Datasheet HTML 10Page - STMicroelectronics AN4539 Datasheet HTML 11Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 7 / 33 page
background image
DocID026506 Rev 1
7/33
AN4539
Getting the kitchen ready
32
1.
Selection of the high-speed PLL output for the HRTIM in RCC_CFGR3 register:
__HAL_RCC_HRTIM1_CONFIG(RCC_HRTIM1CLK_PLLCLK);
2.
Clock enable for the registers mapped on the APB2 bus.
__HRTIM1_CLK_ENABLE();
1.4.3
HRTIM DLL initialization
The HRTIM’s Delay-Locked Loop (DLL) is responsible for providing fine-grained timings and
divide the high-frequency (144 or 128MHz) clock period into 32 evenly spaced steps.
This DLL must be calibrated at least once before high-resolution can be used. The
calibration can be transparently re-launched by software during HRTIM operation if voltage
or temperature conditions have changed. It is also possible to enable periodic calibration by
hardware.
The code snippet below shows how the calibration is done. The high-resolution can be used
once the DLLRDY flag has been set.
/* DLL calibration: periodic calibration enabled, period set to 14µs */
HRTIM1->sCommonRegs.DLLCR = HRTIM_CALIBRATIONRATE_14| HRTIM_DLLCR_CALEN;
/* Check DLL end of calibration flag */
while(HRTIM1->sCommonRegs.ISR & HRTIM_IT_DLLRDY == RESET);
It is recommended to have the periodic calibration enabled, with the lowest calibration
period (set at 14µs), as default condition.
Note:
The code here below will cause the execution to stall if the DLL does not lock (typically if the
HSE oscillator is not properly configured). The HAL library includes a function to perform the
calibration which has a timeout verification and redirect in an error handler if necessary. This
function is the one used in the HAL-based software example.
1.4.4
HRTIM I/Os initialization
The HRTIM inputs and outputs are mapped on standard I/O ports and have to be
programmed as any other I/O peripheral. The HRTIM alternate functions are split between:
•
AF13 channel (for HRTIM I/O ports located on ports A and B);
•
AF3 channel (for HRTIM I/O ports located on port C)
The HRTIM I/Os initialization must be done in two phases. The HRTIM inputs are initialized
first, prior to the HRTIM registers, in the HAL_HRTIM_MspInit function.
The HRTIM outputs must be initialized after the HRTIM control registers programming (done
in the GPIO_HRTIM_outputs_Config function in the examples), and once the counters are
enabled. This is to ensure that the outputs states are correctly defined inside the HRTIM
before passing the control from the GPIO circuitry to the HRTIM timer.
1.4.5
Other peripherals initialization
The HRTIM interacts with many of the MCU peripherals, as listed below. It is not mandatory
to have all of them initialized to have the HRTIM operating. Initialization codes for the
peripherals below are available in some of the examples described later.



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33


датащи скачать

Go To PDF Page


ссылки URL



Вашему бизинису помогли Аллдатащит?  [ DONATE ] 

Что такое Аллдатащит   |   реклама   |   контакт   |   Конфиденциальность   |   Ссылка на техническое описание    |   обмен ссыками   |   поиск по производителю
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com