![Freescale Semiconductor MC9S12ZVM series Скачать руководство пользователя страница 682](http://html1.mh-extra.com/html/freescale-semiconductor/mc9s12zvm-series/mc9s12zvm-series_reference-manual_2330602682.webp)
Chapter 18 LIN Physical Layer (S12LINPHYV2)
MC9S12ZVM Family Reference Manual Rev. 1.3
682
Freescale Semiconductor
18.5
Application Information
18.5.1
Module Initialization
The following steps should be used to configure the module before starting the transmission:
1. Set the slew rate in the LPSLRM register to the desired transmission baud rate.
2. When using the LIN Physical Layer for other purposes than LIN transmission, de-activate the
dominant timeout feature in the LPSLRM register if needed.
3. In most cases, the internal pullup should be enabled in the LPCR register.
4. Route the desired source in the PIM module to the LIN Physical Layer.
5. Select the transmit mode (Receive only mode or Normal mode) in the LPCR register.
6. If the SCI is selected as source, activate the wake-up feature in the LPCR register if needed for the
application (SCI active edge interrupt must also be enabled).
7. Enable the LIN Physical Layer in the LPCR register.
8. Wait for a minimum of a transmit bit.
9. Begin transmission if needed.
NOTE
It is not allowed to try to clear LPOCIF or LPDTIF if they are already
cleared. Before trying to clear an error flag, always make sure that it is
already set.
18.5.2
Interrupt handling in Interrupt Service Routine (ISR)
Both interrupts (TxD-dominant timeout and overcurrent) represent a failure in transmission. To avoid more
disturbances on the transmission line, the transmitter is de-activated in both cases. The interrupt subroutine
must take care of clearing the error condition and starting the routine that re-enables the transmission. For
that purpose, the following steps are recommended:
1. First, the cause of the interrupt must be cleared:
— The overcurrent will be gone after the transmitter has been disabled.
— The TxD-dominant timeout condition will be gone once the selected source for LPTxD has
turned recessive.
2. Clear the corresponding enable bit (LPDTIE or LPOCIE) to avoid entering the ISR again until the
flags are cleared.
3. Notify the application of the error condition (LIN Error handler) and leave the ISR.
In the LIN Error handler, the following sequence is recommended:
1. Disable the LIN Physical Layer (LPCR) while re-configuring the transmission.
— If the receiver must remain enabled, set the LIN Physical Layer into receive only mode instead.
2. Do all required configurations (SCI, etc.) to re-enable the transmission.
3. Wait for a transmit bit (this is needed to successfully re-enable the transmitter).
Содержание MC9S12ZVM series
Страница 116: ...Chapter 2 Port Integration Module S12ZVMPIMV1 MC9S12ZVM Family Reference Manual Rev 1 3 116 Freescale Semiconductor ...
Страница 242: ...Chapter 7 ECC Generation Module SRAM_ECCV1 MC9S12ZVM Family Reference Manual Rev 1 3 242 Freescale Semiconductor ...
Страница 384: ...Chapter 10 Supply Voltage Sensor BATSV3 MC9S12ZVM Family Reference Manual Rev 1 3 384 Freescale Semiconductor ...
Страница 484: ...Chapter 13 Programmable Trigger Unit PTUV2 MC9S12ZVM Family Reference Manual Rev 1 3 484 Freescale Semiconductor ...
Страница 662: ...Chapter 17 Gate Drive Unit GDUV4 MC9S12ZVM Family Reference Manual Rev 1 3 662 Freescale Semiconductor ...
Страница 684: ...Chapter 18 LIN Physical Layer S12LINPHYV2 MC9S12ZVM Family Reference Manual Rev 1 3 684 Freescale Semiconductor ...
Страница 740: ...Chapter 19 128 KB Flash Module S12ZFTMRZ128K512V2 MC9S12ZVM Family Reference Manual Rev 1 3 740 Freescale Semiconductor ...
Страница 756: ...Appendix A MCU Electrical Specifications MC9S12ZVM Family Reference Manual Rev 1 3 756 Freescale Semiconductor ...
Страница 772: ...Appendix D LINPHY Electrical Specifications MC9S12ZVM Family Reference Manual Rev 1 3 772 Freescale Semiconductor ...
Страница 776: ...Appendix E GDU Electrical Specifications MC9S12ZVM Family Reference Manual Rev 1 3 776 Freescale Semiconductor ...
Страница 788: ...Appendix I MSCAN Electrical Specifications MC9S12ZVM Family Reference Manual Rev 1 3 788 Freescale Semiconductor ...
Страница 790: ...Appendix J Package Information MC9S12ZVM Family Reference Manual Rev 1 3 790 Freescale Semiconductor ...