Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

AN4178 Datasheet(PDF) 10 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) 10 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
 10 / 13 page
background image
LIN demonstration software
AN4178
10/13
Doc ID 23745 Rev 1
4.3.2
Software modules
main
This module contains the initialization routines and the main loop.
appli
This module contains the application’s main tasks:
●
reading the status of the USER1 and USER2 buttons, and updating the corresponding
signals in the LIN frame that will be sent to the STM8AF LIN master board
●
updating the status of the LEDs according to the signals read in the LIN frame received
from the STM8AF LIN slave board
If the LIN communication is broken, the application will switch on the red LD3 LED.
l99pm62drv
This module contains the driver for the L99PM62GXP device, which is controlled by the
STM8AF microcontroller through SPI.
If the L99PM62GXP device reports an error to the STM8AF through SPI, the software will
switch on the red LD3 LED. The other LEDs will give additional information as follows:
●
LD4 on: SPI error
●
LD5 on: VS out of range
●
LD6 on: thermal shutdown
lin
This module contains the LIN driver state machine described in Section 3.2.1: LIN state
machine.
stm8l15x_it
This module contains the following interrupt routines:
●
External interrupt of the pin1 routine, and update of the UserButton1 software flag,
when a falling edge is detected on the PE1 port
●
External interrupt of the pin2 routine, and update of the UserButton2 software flag,
when a falling edge is detected on the PE2 port
●
TIM4 interrupt routine, setting timebase ticks for LIN, CAN (not used in demonstration
software), application, and L99PM62GXP watchdog refresh
●
LINUART receive/error interrupt routine, which implements the algorithm described in
Section 3.2.2: LINUART interrupt
4.3.3
STM8S/A standard peripheral library modules
The demonstration software is based on the STM8S/A standard peripheral library version
2.1.0, dated November 2011.



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