STM8-RC-calibration

所属分类:单片机开发
开发工具:C/C++
文件大小:5693KB
下载次数:23
上传日期:2013-05-07 17:59:44
上 传 者lingfeng19
说明:  STM8 内部RC矫正参考文档,源代码和手册
(STM8 internal RC oscillator calibration)

文件列表:
STM8L15x_AN3101_FW_V1.1.0\_htmresc (0, 2010-10-06)
STM8L15x_AN3101_FW_V1.1.0\_htmresc\logo.bmp (6798, 2009-11-03)
STM8L15x_AN3101_FW_V1.1.0\Libraries (0, 2010-10-06)
STM8L15x_AN3101_FW_V1.1.0\Libraries\STM8L15x_StdPeriph_Driver (0, 2010-10-06)
STM8L15x_AN3101_FW_V1.1.0\Libraries\STM8L15x_StdPeriph_Driver\inc (0, 2010-10-06)
STM8L15x_AN3101_FW_V1.1.0\Libraries\STM8L15x_StdPeriph_Driver\inc\stm8l15x.h (123356, 2010-10-05)
STM8L15x_AN3101_FW_V1.1.0\Libraries\STM8L15x_StdPeriph_Driver\inc\stm8l15x_adc.h (16750, 2010-10-05)
STM8L15x_AN3101_FW_V1.1.0\Libraries\STM8L15x_StdPeriph_Driver\inc\stm8l15x_beep.h (3608, 2010-10-05)
STM8L15x_AN3101_FW_V1.1.0\Libraries\STM8L15x_StdPeriph_Driver\inc\stm8l15x_clk.h (18574, 2010-10-05)
STM8L15x_AN3101_FW_V1.1.0\Libraries\STM8L15x_StdPeriph_Driver\inc\stm8l15x_comp.h (9885, 2010-10-05)
STM8L15x_AN3101_FW_V1.1.0\Libraries\STM8L15x_StdPeriph_Driver\inc\stm8l15x_dac.h (10672, 2010-10-05)
STM8L15x_AN3101_FW_V1.1.0\Libraries\STM8L15x_StdPeriph_Driver\inc\stm8l15x_dma.h (13622, 2010-10-05)
STM8L15x_AN3101_FW_V1.1.0\Libraries\STM8L15x_StdPeriph_Driver\inc\stm8l15x_exti.h (9471, 2010-10-05)
STM8L15x_AN3101_FW_V1.1.0\Libraries\STM8L15x_StdPeriph_Driver\inc\stm8l15x_flash.h (13025, 2010-10-05)
STM8L15x_AN3101_FW_V1.1.0\Libraries\STM8L15x_StdPeriph_Driver\inc\stm8l15x_gpio.h (6453, 2010-10-05)
STM8L15x_AN3101_FW_V1.1.0\Libraries\STM8L15x_StdPeriph_Driver\inc\stm8l15x_i2c.h (34960, 2010-10-05)
STM8L15x_AN3101_FW_V1.1.0\Libraries\STM8L15x_StdPeriph_Driver\inc\stm8l15x_irtim.h (2195, 2010-10-05)
STM8L15x_AN3101_FW_V1.1.0\Libraries\STM8L15x_StdPeriph_Driver\inc\stm8l15x_itc.h (11129, 2010-10-05)
STM8L15x_AN3101_FW_V1.1.0\Libraries\STM8L15x_StdPeriph_Driver\inc\stm8l15x_iwdg.h (4737, 2010-10-05)
STM8L15x_AN3101_FW_V1.1.0\Libraries\STM8L15x_StdPeriph_Driver\inc\stm8l15x_lcd.h (21917, 2010-10-05)
STM8L15x_AN3101_FW_V1.1.0\Libraries\STM8L15x_StdPeriph_Driver\inc\stm8l15x_pwr.h (4331, 2010-10-05)
STM8L15x_AN3101_FW_V1.1.0\Libraries\STM8L15x_StdPeriph_Driver\inc\stm8l15x_rst.h (3198, 2010-10-05)
STM8L15x_AN3101_FW_V1.1.0\Libraries\STM8L15x_StdPeriph_Driver\inc\stm8l15x_rtc.h (34974, 2010-10-05)
STM8L15x_AN3101_FW_V1.1.0\Libraries\STM8L15x_StdPeriph_Driver\inc\stm8l15x_spi.h (13908, 2010-10-05)
STM8L15x_AN3101_FW_V1.1.0\Libraries\STM8L15x_StdPeriph_Driver\inc\stm8l15x_syscfg.h (19304, 2010-10-05)
STM8L15x_AN3101_FW_V1.1.0\Libraries\STM8L15x_StdPeriph_Driver\inc\stm8l15x_tim1.h (34971, 2010-10-05)
STM8L15x_AN3101_FW_V1.1.0\Libraries\STM8L15x_StdPeriph_Driver\inc\stm8l15x_tim2.h (27956, 2010-10-05)
STM8L15x_AN3101_FW_V1.1.0\Libraries\STM8L15x_StdPeriph_Driver\inc\stm8l15x_tim3.h (27900, 2010-10-05)
STM8L15x_AN3101_FW_V1.1.0\Libraries\STM8L15x_StdPeriph_Driver\inc\stm8l15x_tim4.h (11145, 2010-10-05)
STM8L15x_AN3101_FW_V1.1.0\Libraries\STM8L15x_StdPeriph_Driver\inc\stm8l15x_usart.h (15039, 2010-10-05)
STM8L15x_AN3101_FW_V1.1.0\Libraries\STM8L15x_StdPeriph_Driver\inc\stm8l15x_wfe.h (7827, 2010-10-05)
STM8L15x_AN3101_FW_V1.1.0\Libraries\STM8L15x_StdPeriph_Driver\inc\stm8l15x_wwdg.h (2608, 2010-10-05)
STM8L15x_AN3101_FW_V1.1.0\Libraries\STM8L15x_StdPeriph_Driver\src (0, 2010-10-06)
STM8L15x_AN3101_FW_V1.1.0\Libraries\STM8L15x_StdPeriph_Driver\src\stm8l15x_adc.c (20233, 2010-10-05)
STM8L15x_AN3101_FW_V1.1.0\Libraries\STM8L15x_StdPeriph_Driver\src\stm8l15x_beep.c (5325, 2010-10-05)
STM8L15x_AN3101_FW_V1.1.0\Libraries\STM8L15x_StdPeriph_Driver\src\stm8l15x_clk.c (20397, 2010-10-05)
STM8L15x_AN3101_FW_V1.1.0\Libraries\STM8L15x_StdPeriph_Driver\src\stm8l15x_comp.c (16228, 2010-10-05)
STM8L15x_AN3101_FW_V1.1.0\Libraries\STM8L15x_StdPeriph_Driver\src\stm8l15x_dac.c (20996, 2010-10-05)
STM8L15x_AN3101_FW_V1.1.0\Libraries\STM8L15x_StdPeriph_Driver\src\stm8l15x_dma.c (16158, 2010-10-05)
STM8L15x_AN3101_FW_V1.1.0\Libraries\STM8L15x_StdPeriph_Driver\src\stm8l15x_exti.c (13057, 2010-10-05)
... ...

/** @page Internal RC oscillators calibration application note @par Firmware description This application note describes a firmware that: 1- calibrates the High-Speed Internal RC oscillator (HSI) using an accurate reference frequency. 2- measures the Low-Speed Internal RC oscillator (LSI) By default the firmware calibrates the HSI clock with minimum error method. Once the calibration has finished, the HSI values before and after calibration are displayed on LCD and the three leds LD1, LD2 and LD3 are on. When the fixed error method is selected and if the calibration routine succeeded finding the reqquired error, a success message is displayed on LCD and the green led LD1 is on. Otherwise, a fail message is displayed on LCD and the red led LD3 is on. When the LSI measurement routine is slected, the Independent Watchdog time out can be checked by measuring the time during which LED4_GPIO_PIN (PA7 for STM8L1526-EVAL and PH3 for STM8L1528-EVAL) is in low state. @par Directory contents - Project\\Internal RC oscillators calibration\\inc - hsi_calibration.h HSI calibration configuration file - lsi_measurement.h LSI measurement configuration file - stm8l15x_conf.h Library Configuration file - stm8l15x_it.h Interrupt routines declaration - Project\\Internal RC oscillators calibration\\src - main.c Main program - hsi_calibration.c HSI calibration routine - lsi_measurement.c LSI measurement routine - stm8l15x_it.c Interrupt routines source - stm8_interrupt_vector.c Interrupt handlers - Project\\Internal RC oscillators calibration\\RIDE - stm8l1526-eval.rapp Contains the Ride workspace for medium density devices - stm8l1528-eval.rapp Contains the Ride workspace for high density devices - project.rprj Contains the Ride project - Project\\Internal RC oscillators calibration\\STVD\\Cosmic - project.stw Contains the STVD workspace - stm8l1526-eval.stp Contains the STVD project for medium density devices - stm8l1528-eval.stp Contains the STVD project for high density devices - stm8_interrupt_vector.c Interrupt handlers - Project\\Internal RC oscillators calibration\\STVD\\Raisonance - project.stw Contains the STVD workspace - stm8l1526-eval.stp Contains the STVD project for medium density devices - stm8l1528-eval.stp Contains the STVD project for high density devices - Project\\Internal RC oscillators calibration\\EWSTM8 - stm8l1526-eval.ewd Contains project settings for debugger(C-SPY) for medium density devices - stm8l1526-eval.ewp Contains IAR Embedded Workbench project for medium density devices - stm8l1528-eval.ewd Contains project settings for debugger(C-SPY) for high density devices - stm8l1528-eval.ewp Contains IAR Embedded Workbench project for high density devices - project.eww Contains EWSTM8 Workspace @par Hardware and Software environment - This application runs on STM8L15x High-Density and Medium-Density Devices. - This application has been tested with STMicroelectronics STM8L1528-EVAL (STM8L15x High-Density devices) and STM8L1526-EVAL (STM8L15x Medium-Density devices) evaluation boards and can be easily tailored to any other - STM8L1526-EVAL and STM8L1528-EVAL Set-up - Make sure that the LCD glass daughter board is mounted in IO position. - Dot matrix LCD - Leds: LD1, LD2, LD3 and LD4 - By default, the LSE method is used so no hardware connection is required (the 32.768 KHz quart is already connected in STM8L152X-EVAL). In case of using other reference frequency, connect the source to PB0 (The source voltage levels have to correspond to levels allowed for this pin). @par How to use it with STVD ? - Open the STVD workspace - Rebuild all files: Project->Rebuild all - Load project image: Debug->Start/Stop Debug Session - Run program: Debug->Run (F5) @par How to use it with RIDE ? - Open the RIDE workspace (project.rprj) - Choose the desired project related to the used product from the list: in the "view Project Explorer" --> Right click on the desired project and select "Set as StartUp application" - Rebuild all files: : in the "view Project Explorer" Right click on the active application and select "Build" - Load project image: Debug->Load(Ctrl+L) - Run program: Debug->Start (Ctrl+D) @par How to use it with EWSTM8 ? - Open the EWSTM8 workspace - Rebuild all files: Project-> Rebuild all. - Load project image: Project-> Download and Debug - Run program: Debug->Go (Ctrl+F5) @note - Medium-Density devices are STM8L15x microcontrollers where the Flash memory density ranges between 16 and 32 Kbytes. - Medium density Plus devices are STM8L151R6, STM8L152R6 microcontrollers where the Flash memory density is fixed and equal to 32 Kbytes and with wider range of peripheral and features than the medium density devices. - High-Density devices are STM8L15x microcontrollers where the Flash memory density is *** Kbytes and with the same peripheral set than Medium Density Plus devices. */ /******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/

近期下载者

相关文件


收藏者