Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

AN4178 Datasheet(PDF) 11 Page - STMicroelectronics

Part # AN4178
Description  LIN communication with two STM8AF boards of STM8A-DISCOVERY
PDF  13 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN4178 Datasheet(HTML) 11 Page - STMicroelectronics

Back Button AN4178 Datasheet HTML 5Page - STMicroelectronics AN4178 Datasheet HTML 6Page - STMicroelectronics AN4178 Datasheet HTML 7Page - STMicroelectronics AN4178 Datasheet HTML 8Page - STMicroelectronics AN4178 Datasheet HTML 9Page - STMicroelectronics AN4178 Datasheet HTML 10Page - STMicroelectronics AN4178 Datasheet HTML 11Page - STMicroelectronics AN4178 Datasheet HTML 12Page - STMicroelectronics AN4178 Datasheet HTML 13Page - STMicroelectronics  
Zoom Inzoom in Zoom Outzoom out
 11 / 13 page
background image
AN4178
LIN demonstration software
Doc ID 23745 Rev 1
11/13
The following driver modules are used:
●
stm8s_exti.c, for the external interrupts on port E (USER1 and USER2 buttons)
●
stm8s_clk.c, for configuring clocks and enabling HSE
●
stm8s_gpio.c, for initializing, reading and updating all ports
●
stm8s_spi.c, for SPI communication with the L99PM62GXP device
●
stm8s_tim4.c, for generating a 1 ms timebase
●
stm8s_uart3.c, for initializing LINUART
Note:
LINUART is described as UART3 in the RM0016 STM8S and STM8A reference manual.
4.4
Debugging with ST visual develop (STVD)
4.4.1
Downloading the software tools
1.
Download your free software environment (IDE). Choose between:
–
ST’s MCU toolset, composed of ST Visual Develop (STVD) and ST Visual
Programmer (STVP), available at http://www.st.com
–
IAR Embedded Workbench for STM8 30-day time-limited edition, available at
http://www.iar.com, under the “Software Download” tab
2.
Download your free compilers if you chose STVD. While IAR Embedded Workbench for
STM8 includes its own compiler, STVD must be used together with one of the following:
–
Cosmic 32 K 1-year time-limited edition, available at
http://www.cosmicsoftware.com/download_stm8_32k.php
–
Raisonance 32 K, available at http://www.mcu-raisonance.com
4.4.2
Opening the workspace and selecting the correct project
Before opening the workspace, first unzip the zip file delivered with this application note.
1.
In ST Visual Develop, click File / Open Workspace...
2.
Select the stm8a_discover_workspace.stw file in either the “Projects\STVD\cosmic”
folder or the “Projects\STVD\raisonance” folder, depending on the compiler you want to
use.
The workspace contains the following projects:
–
stm8af_discover
–
stm8al_discover
3.
Choose a project by selecting it in the workspace window and right-clicking it with the
mouse. Choose “Set as Active Project”.
4.4.3
Rebuilding and debugging the project
You can rebuild the project, download the code and debug. Make sure to connect the USB
cable to the appropriate board.
Refer to UM1574 STM8A-DISCOVERY User manual for more information about debugging.



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13


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