数据搜索系统,热门电子元器件搜索
  Chinese  ▼
ALLDATASHEETCN.COM

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
标志 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


链接网址



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