| Zakładka z wyszukiwarką danych komponentów |
|
AN4178 Arkusz danych(PDF) 5 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN4178 Arkusz danych(HTML) 5 Page - STMicroelectronics |
|
5 / 13 page ![]() AN4178 Implementing a LIN slave node with STM8AF board Doc ID 23745 Rev 1 5/13 3 Implementing a LIN slave node with STM8AF board 3.1 STM8AF microcontroller LINUART features for LIN slave LINUART supports autonomous handling of LIN headers. The software is notified of header reception through a dedicated flag, LHDF. This means a single interrupt occurs only when the entire header is received, including the Break, the Synch Field and the Identifier Field. LINUART implements a mute mode, allowing the software to remain quiet without generating any interrupts until reception of the next header. This is very useful for filtering frames for which the STM8AF is neither publisher nor subscriber. All data bytes of the frame response will thus be ignored by the LINUART, and will not generate any interrupts. The automatic resynchronization feature allows a LIN slave to be built with the STM8AF microcontroller, without the need for an external crystal, oscillator or resonator. The LINUART can synchronize on the Synch Field of each received header, and automatically adjusts the baudrate prescaler in order to receive and send the rest of the frame with the right frequency tolerance, whatever the frequency deviation of the embedded internal RC oscillator (HSI) may be. If one of the following errors is detected during the header reception, the software is notified through the LHE flag: ● resynchronization error, if the deviation is more than 14% ● identifier error (framing error or parity error) ● break delimiter error, if the delimiter is too short ● header timeout, if the LIN header is longer than the T_HEADER_MAX defined in the LIN standard In order to enhance system robustness, the LINUART can detect a Break at any time, even while receiving a data byte, and resynchronizes upon detecting the Break. 3.2 Software algorithm The software algorithm described below is implemented in the STM8AF slave software. For details, refer to Section 4.3: STM8AF LIN slave software description. 3.2.1 LIN state machine The LIN task is called regularly by the main routine. This task is a basic LIN slave driver that implements a state machine with the following states: ● Idle ● Identifier ● DataReception ● DataTransmission |
|
|
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 |