Chapter 2 Port Integration Module (S12ZVMBPIMV3)MC9S12ZVMB Family Reference Manual Rev. 1.3112 NXP Semiconductorsratios (RatioH_HVI, RatioL_HVI ) can be chosen (PIRL) on the analog input or the voltage divider can bebypassed (PTADIRL=1). Additionally in latter case the impedance converter in the ADC signal path canbe used or bypassed in direct input mode (PTABYPL).In run mode the digital input buffer of the selected pin is disabled to avoid shoot-through current (unlessPTTEL is set and the voltage divider is not bypassed). Thus pin interrupts cannot be generated.In stop mode (RPM) the digital input buffer is enabled only if DIENL=1 to support wakeup functionality.Table 2-47 shows the HVI input configuration depending on register bits and operation mode.NOTEAn external resistor R EXT_HVI must always be connected to the high-voltage input to protect the device pins from fast transients and to achievethe specified pin input divider ratios when using the HVI in analog mode.2.5 Initialization and Application Information2.5.1 Port Data and Data Direction Register writesIt is not recommended to write PORTx/PTx and DDRx in a word access. When changing the register pinsfrom inputs to outputs, the data may have extra transitions during the write access. Initialize the port dataregister before enabling the outputs.2.5.2 SCI Baud Rate DetectionThe baud rate for SCI0 and SCI1 can be determined by using a timer channel to measure the data rate onthe related RXD signal.1. Establish the link:Table 2-47. HVI Input ConfigurationsMode DIENL PTAENL Digital Input Analog Input Resulting FunctionRun 0 0 off off Input disabled (Reset)0 1 off 1 enabled Analog input, interrupt not supported1 0 enabled off Digital input, interrupt supported1 1 off (1)1. Enabled if PTTEL=1 & PTADIRL=0)enabled Analog input, interrupt not supportedStop(2)2. The term “stop mode” is limited to voltage regulator operating in reduced performance mode (RPM; refer to “Low PowerModes” section in device overview). In any other case the HVI input configuration defaults to “run mode”. Therefore setPTAENL=0 before entering stop mode in order to generally support wakeup from stop.0 0 off off Input disabled, wakeup from stop notsupported0 1 off off1 0 enabled off Digital input, wakeup from stop supported1 1 enabled off