전자부품 데이터시트 검색엔진
  Korean  ▼
ALLDATASHEET.CO.KR

X  

AN3258 데이터시트(PDF) 9 Page - STMicroelectronics

부품명 AN3258
상세설명  Local interconnect network
PDF  16 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
제조업체  STMICROELECTRONICS [STMicroelectronics]
홈페이지  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN3258 데이터시트(HTML) 9 Page - STMicroelectronics

Back Button AN3258 Datasheet HTML 5Page - STMicroelectronics AN3258 Datasheet HTML 6Page - STMicroelectronics AN3258 Datasheet HTML 7Page - STMicroelectronics AN3258 Datasheet HTML 8Page - STMicroelectronics AN3258 Datasheet HTML 9Page - STMicroelectronics AN3258 Datasheet HTML 10Page - STMicroelectronics AN3258 Datasheet HTML 11Page - STMicroelectronics AN3258 Datasheet HTML 12Page - STMicroelectronics AN3258 Datasheet HTML 13Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 9 / 16 page
background image
AN3258
HSI calibration
Doc ID 17825 Rev 1
9/16
1.4
HSI calibration routine
The calibration routines are written in C language. They include STM8A/S firmware library
functions.
The calibration routine starts with the configuration of the HSI clock prescaler value bits,
HSIDIV[1:0], in the CLK_CKDIVR register. The value programmed in the software example
is HSIDIV[1:0] = 00 which means, fHSIDIV = fHSI/1 = 16 MHz. The HSI trimming bits,
HSITRIM[3:0] or HSITRIM[2:0], in the CLK_HSITRIMR register are kept at reset value.
The LINUART peripheral is initialized at baud rate 19200 bps, 8 data bits, 1 stop bit and no
parity. LINUART is configured in slave mode (LSLV bit =1) with the automatic
resynchronization feature enabled (LASE bit = 1) and the LIN divider update method
(LDUM) bit = 0. Both LIN header detection(LHDIEN) and LIN receiver (RIEN) interrupts are
enabled. The LINEN bit is set to enable the LIN mode.
When a valid LIN header is received by the LIN slave, the LIN receive interrupt is generated.
Inside the interrupt service routine, if the LIN header detection flag (LHDF) is set,
LDIV_MEAS is read from the BRR1 and BRR2 registers (see Figure 4). Using Equation 4,
fMEASURED is calculated. The variation of the HSI oscillator frequency (ΔFREQUENCY) is
calculated by using Equation 5.
Depending on whether the
ΔFREQUENCY is positive or negative, the trimming value (as
described in Section 1.1: HSI trimming bits) is written to increase or decrease the HSI
oscillator frequency by one trimming step. When the next sync frame is received, the
procedure is repeated to check and calibrate the HSI oscillator until the trimming value
reaches the upper/lower limit or until the measured
ΔFREQUENCY is greater than the value
measured with the previous trimming value. The maximum number of valid LIN headers
required to calibrate the HSI oscillator is four if three trimming bits are used and eight if four
trimming bits are used.



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16


데이터시트 다운로드

Go To PDF Page


링크 URL



ALLDATASHEET 가 귀하에 도움이 되셨나요?  [ DONATE ] 

Alldatasheet는?   |   광고문의   |   운영자에게 연락하기   |   개인정보취급방침   |   링크 투 데이터시트    |   링크교환   |   제조사별 검색
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