| поискавой системы для электроныых деталей |
|
AN4539 датащи(PDF) 7 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN4539 датащи(HTML) 7 Page - STMicroelectronics |
|
7 / 33 page ![]() 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. |
|
ссылки URL |
| Вашему бизинису помогли Аллдатащит? [ DONATE ] |
Что такое Аллдатащит | реклама | контакт | Конфиденциальность | Ссылка на техническое описание | обмен ссыками | поиск по производителю All Rights Reserved©Alldatasheet.com |
| 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 |