Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

AN4101 Datasheet(PDF) 16 Page - STMicroelectronics

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

AN4101 Datasheet(HTML) 16 Page - STMicroelectronics

Back Button AN4101 Datasheet HTML 12Page - STMicroelectronics AN4101 Datasheet HTML 13Page - STMicroelectronics AN4101 Datasheet HTML 14Page - STMicroelectronics AN4101 Datasheet HTML 15Page - STMicroelectronics AN4101 Datasheet HTML 16Page - STMicroelectronics AN4101 Datasheet HTML 17Page - STMicroelectronics AN4101 Datasheet HTML 18Page - STMicroelectronics AN4101 Datasheet HTML 19Page - STMicroelectronics AN4101 Datasheet HTML 20Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 16 / 21 page
background image
LIN demonstration software
AN4101
16/21
Doc ID 23127 Rev 1
7.3
STM8AL software description
7.3.1
STM8AL peripherals
The following STM8AL peripherals are used by the application:
●
SPI, which is used in master mode at 250 kHz to initialize the L99PM62GPX and
refresh its watchdog
●
TIM4, which allows generation of a 1 ms timebase
●
HSE, the High Speed External Clock, which when enabled allows the use of the
external 16 MHz crystal oscillator
●
USART, which is used to perform LIN communication in slave mode
●
GPIO
–
PE7 and PC7 ports are used for LED display.
–
PE1 and PE2 are used for the USER1 and USER2 push buttons.
–
PB7, PB6, PB5 and PB4 are used respectively for the SPI MISO, MOSI, SCK and
NSS.
–
PC3 and PC2 are used for USART TX and RX.
7.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 board
●
updating the status of the LEDs according to the signals read in the LIN frame received
from the STM8AF board
If the LIN communication is broken, the application will switch on the red LD3 LED and
display “ERR2” on the LCD screen.
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 STM8AL through SPI, the software will
display “ERR1” on the LCD screen. The LCD bars will give additional information as follows:
●
BAR0 on: SPI error
●
BAR1 on: VS out of range
●
BAR2 on: thermal shutdown
lin
This module contains the LIN driver state machine described in Section 6.2.1: LIN state
machine.



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21


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