| поискавой системы для электроныых деталей |
|
AN3209 датащи(PDF) 17 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN3209 датащи(HTML) 17 Page - STMicroelectronics |
|
17 / 42 page ![]() 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 ; } |
|
ссылки 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 |