Chapter 23 LIN Physical Layer (S12LINPHYV2)
S12ZVHY/S12ZVHL Family Reference Manual Rev. 1.05
772
Freescale Semiconductor
23.5
Application Information
23.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.
23.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).
Содержание MC9S12ZVHL32
Страница 21: ...S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 Freescale Semiconductor 21 PAGE INTENTIONALLY LEFT BLANK...
Страница 22: ...S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 22 Freescale Semiconductor PAGE INTENTIONALLY LEFT BLANK...
Страница 686: ...Chapter 20 ECC Generation module SRAM_ECCV1 S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 686 Freescale Semiconductor...
Страница 752: ...Chapter 22 Supply Voltage Sensor BATSV2 S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 752 Freescale Semiconductor...
Страница 774: ...Chapter 23 LIN Physical Layer S12LINPHYV2 S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 774 Freescale Semiconductor...
Страница 788: ...Appendix A MCU Electrical Specifications S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 788 Freescale Semiconductor...
Страница 794: ...Appendix B ADC Electricals S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 794 Freescale Semiconductor...
Страница 798: ...Appendix D IRC Electrical Specifications S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 798 Freescale Semiconductor...
Страница 802: ...Appendix F MSCAN Electrical Specifications S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 802 Freescale Semiconductor...
Страница 806: ...Appendix G NVM Electrical Parameters S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 806 Freescale Semiconductor...
Страница 810: ...Appendix H BATS Electrical Specifications S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 810 Freescale Semiconductor...
Страница 816: ...Appendix K OSC32K Electrical Specifications S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 816 Freescale Semiconductor...
Страница 822: ...Appendix L SPI Electrical Specifications S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 822 Freescale Semiconductor...
Страница 826: ...Appendix M LINPHY Electrical Specifications S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 826 Freescale Semiconductor...
Страница 829: ...Appendix O Package Information S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 830 Freescale Semiconductor O 1 144 LQFP...
Страница 830: ...Appendix O Package Information S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 Freescale Semiconductor 831...
Страница 831: ...Appendix O Package Information S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 832 Freescale Semiconductor...
Страница 832: ...Appendix O Package Information S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 Freescale Semiconductor 833 O 2 100 LQFP...
Страница 833: ...Appendix O Package Information S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 834 Freescale Semiconductor...
Страница 834: ...Appendix O Package Information S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 Freescale Semiconductor 835...
Страница 835: ...Appendix O Package Information S12ZVHY S12ZVHL Family Reference Manual Rev 1 05 836 Freescale Semiconductor...