Chapter 2 Port Integration Module (S12ZVHYPIMV1)
S12ZVHY/S12ZVHL Family Reference Manual Rev. 1.05
Freescale Semiconductor
113
2.5
Initialization and Application Information
2.5.1
Port Data and Data Direction Register writes
It is not recommended to write PORTx/PTx and DDRx in a word access. When changing the register pins
from inputs to outputs, the data may have extra transitions during the write access. Initialize the port data
register before enabling the outputs.
2.5.2
SCI0,1 Baud Rate Detection
The baud rate for SCI0 and SCI1 is achieved by using a timer channel to measure the data rate on the RXD
pin.
1. Establish the link:
— For SCI0: Set [T1IC0RR1:T1IC0RR0]=0b10 to disconnect IOC0 from TIM1 input capture
channel 0 and reroute the timer input from the RXD0 of SCI0.
— For SCI1: Set [T1IC0RR1:T1IC0RR0]=0b11 to disconnect IOC0 from TIM1 input capture
channel 0 and reroute the timer input from the RXD1 of SCI1.
2. Determine pulse width of incoming data: Configure TIM1 IC0 to measure time between incoming
signal edges.
2.5.3
RTC on chip calibration
The on chip RTC calibration used the TIM1 IC0 and IC1 channel.
1. Establish the link:
— Set the RTC configuration to generate the expect CALCLK frequency
— Set [T1IC0RR1:T1IC0RR0]=0b10 to disconnect IOC0 from TIM1 input capture channel 0 and
reroute the RTC CALCLK to IC0.
— Input a standard clock on RTC_CAL pin
2. Determine pulse width of incoming data: Configure TIM1 IC0 and IC1 to measure time between
incoming signal edges. Need to pay attention to timer overflow also.
3. Compare the data between IC0 and IC1 to get the RTC clock frequency value. Suppose the
RTC_CAL measure value is B, and CALCLK measure value is A. Then the CALCLK frequency
will be between f
RTC_CAL
* (B-2) / (A+2) and f
RTC_CAL
* (B+2) / (A-2). Depend on the
calibration, user need to select the RTC_CAL, CALCLK and TIM1 frequency.
2.5.4
RTC off chip calibration
The off chip RTC calibration, user need to set the CALCLKEN bit in the PIMMIC register to enable the
CALCLK out on RTC_CAL pin. Base on the external requirement, user can set the RTCMOD and CALS
bit in RTCCTL3 registers to get the expected CALCLK output on RTC_CAL pin.
Содержание 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...