Electronic Components Datasheet Search
  English  ▼

X  

AN3139 Datasheet(PDF) 12 Page - STMicroelectronics

Part # AN3139
Description  Migration and compatibility guidelines for STM8L microcontroller applications
PDF  63 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN3139 Datasheet(HTML) 12 Page - STMicroelectronics

Back Button AN3139 Datasheet HTML 8Page - STMicroelectronics AN3139 Datasheet HTML 9Page - STMicroelectronics AN3139 Datasheet HTML 10Page - STMicroelectronics AN3139 Datasheet HTML 11Page - STMicroelectronics AN3139 Datasheet HTML 12Page - STMicroelectronics AN3139 Datasheet HTML 13Page - STMicroelectronics AN3139 Datasheet HTML 14Page - STMicroelectronics AN3139 Datasheet HTML 15Page - STMicroelectronics AN3139 Datasheet HTML 16Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 12 / 63 page
background image
STM8L family compatibility
AN3139
12/63
Doc ID 16993 Rev 3
however essential during development time. Extensive software libraries are available for
both STM8L10x, STM8L15x and STM8L16x devices, providing the user with a hardware
abstraction layer (HAL) for all MCU resources. Moreover, there is not a single control/status
bit that is not covered by a C function or an API.
The software library covers three abstraction levels, and it includes:
1.
A complete register address map with all bits, bit fields and registers declared in C. By
providing this map, the software library makes the designers’ task much lighter and,
even more importantly so, it gives all the benefits of a bug-free reference mapping file,
thus speeding up the early project phase.
2.
A collection of routines and data structures in API form, that covers all peripheral
functions. This collection can directly be used as a reference framework, since it also
includes macros for supporting core-related intrinsic features and common constant
and data type definition. Moreover, it is compiler agnostic and can therefore be used
with any existing or future toolchain. It was developed using the MISRA C automotive
standard.
3.
A set of examples covering all available peripherals (35 examples so far for the
STM8L10x sub-family, 35 for the STM8L15x sub-family), with template projects for the
most common development toolchains. With the appropriate hardware evaluation
board, only a few hours are needed to get started with a brand new microcontroller. It is
then up to you to choose how to use the library. You can either pick up the files useful
for the design, use examples to get trained or quickly evaluate the product. You can
also use the API to save development time.
Let us now have a look at the few key files and concepts. Two separate libraries support the
STM8L10x and STM8L15x devices. In the file names below, you simply need to replace the
“stm8l1xx_” prefix by “stm8l10x” or “stm8l15x” depending on the chosen product.
●
stm8l1xx_.h
This file is the only header file that must be included in the C source code, usually in main.c.
This file contains:
–
data structures and address mapping for all peripherals
–
macros to access peripheral register hardware (for bit manipulation for instance),
plus STM8 core intrinsics
–
a configuration section used to select the device implemented in the target
application. You also have the choice to use or not the peripheral drivers in the
application code (that is code based on direct access to registers rather than
through API drivers)
●
stm8l1xx_conf.h
This is the peripheral driver configuration file, where you specify the peripherals you want to
use in your application, plus a few application-specific parameters such as the crystal fre-
quency.
●
stm8l1xxx_it.c
This file contains the template IRQ handler to be filled, but this is already the first
development step.
Once you have understood the above operating principle and file organization, for simple
applications, you could virtually switch from one product to the other without referring to the
reference manual. Figure 2: STM8L10x code example and Figure 3: STM8L15x code exam-
ple show the initialization code (using the firmware library) for STM8L10x and STM8L15x
products, respectively.



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 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
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