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

X  

AN3209 데이터시트(PDF) 17 Page - STMicroelectronics

부품명 AN3209
상세설명  Developing your M24LR64-R datalogger application for temperature acquisition
PDF  42 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
제조업체  STMICROELECTRONICS [STMicroelectronics]
홈페이지  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN3209 데이터시트(HTML) 17 Page - STMicroelectronics

Back Button AN3209 Datasheet HTML 13Page - STMicroelectronics AN3209 Datasheet HTML 14Page - STMicroelectronics AN3209 Datasheet HTML 15Page - STMicroelectronics AN3209 Datasheet HTML 16Page - STMicroelectronics AN3209 Datasheet HTML 17Page - STMicroelectronics AN3209 Datasheet HTML 18Page - STMicroelectronics AN3209 Datasheet HTML 19Page - STMicroelectronics AN3209 Datasheet HTML 20Page - STMicroelectronics AN3209 Datasheet HTML 21Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 17 / 42 page
background image
AN3209
Component overview
Doc ID 17419 Rev 2
17/42
2.2.3
STM8L101K3 configuration
Clock configuration
The STM8L101K3 microcontroller is configured as follows for the demonstration M24LR64-
R_Datalogger_application_firmware:
●
Master clock set to 2 MHz (minimum)
●
I2C, timer 2 (TIM2), Auto wakeup clocks enabled.
This is done by calling the following functions of the STM8L101 firmware library:
CLK_MasterPrescalerConfig(CLK_MasterPrescaler_HSIDiv8);
CLK_PeripheralClockConfig(CLK_Peripheral_I2C, ENABLE);
CLK_PeripheralClockConfig(CLK_Peripheral_TIM2, ENABLE);
CLK_PeripheralClockConfig(CLK_Peripheral_AWU, ENABLE);
I/O configuration
Three dedicated pins are set in output mode to power the Dual interface EEPROM, the
temperature sensor, and the I2C bus. This is done by using the following STM8L101
firmware library function:
GPIO_Init (GPIOD,GPIO_Pin_5 • GPIO_Pin_6 • GPIO_Pin_7,
GPIO_Mode_Out_PP_Low_Fast);
This example is illustrated in Figure 4.
Note:
It is recommended to set unused pins in input mode to minimize power consumption.
Auto wakeup configuration
The Auto wakeup (AWU) provides an internal wakeup timebase that can be used when the
microcontroller enters Active-halt power saving mode. This timebase is clocked by the low
speed internal (LSI) RC oscillator clock.
To ensure the best possible accuracy when using the LSI clock, its frequency can be
measured with TIM2 timer input capture 1, by calling the AWU_AutoLSICalibration
functions of the STM8L101 firmware library (see code example below):
AWU_AutoLSICalibration ();
AWU_Init (AWU_Timebase_1s);
AWU_Cmd (ENABLE);
/*The datalogger FW then issues the HALT instruction to switch the
microcontroller to Active-halt low power mode. In the following
function, command3 will automatically be executed 1second after
command2 according to the previous configuration */
void function (void)
{
command1 ;
command2 ;
halt ;
command3 ;
}



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 34 35 36 37 38 39 40 41 42


데이터시트 다운로드

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