| Zakładka z wyszukiwarką danych komponentów |
|
AN4178 Arkusz danych(PDF) 8 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN4178 Arkusz danych(HTML) 8 Page - STMicroelectronics |
|
8 / 13 page ![]() LIN demonstration software AN4178 8/13 Doc ID 23745 Rev 1 4.2 STM8AF LIN master software description 4.2.1 STM8AF peripherals The following STM8AF 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 ● LINUART, which is used to perform LIN communication in master mode ● GPIO: – PA3, PD3, PD0, PE3 and PC3 ports are used for LED display. – PE2 and PE1 are used for the USER1 and USER2 push buttons. – PC7, PC6, PC5 and PE5 are used respectively for the SPI MISO, MOSI, SCK and NSS. – PD5 and PD6 are used for LINART TX and RX. 4.2.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 slave 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 2.2.1: LIN state machine. |
|
|
Link URL |
| Czy Alldatasheet okazała się pomocna? [ DONATE ] |
O Alldatasheet | Reklama | Kontakt | Polityka prywatności | Link do karty katalogowej | Linki | Lista producentów All Rights Reserved©Alldatasheet.com |
| 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 |