S9S12XHY128F0VLMR is used for instrument products, and low pressure judgment needs to be made through pin3 port of the MCU PT0 pin docking plug-in.
When the instrument is in low-voltage working mode, pin3 port is not connected to low level, and PT0 pin is judged to be low level, which triggers the related alarm function.
After testing, if pin PT0 is below 3.5V, it will be judged as low level, and the register value is set to 0 by 1, making an error (at present, the software register reads the code: _pTI@ (0x0000 + 0x00000241UL);)
How to change the software so that the PT0 pin is judged as high level above 2V voltage?
This cannot be changed by the software. The datasheet guarantees that the port reads LOW when Vi is < VDD35 * 0.35 and HIGH when Vi is > VDD35 * 0.65. Vi in the range of (VDD35 * 0.35; VDD35 * 0.65) can be read either as HIGH or LOW with hysteresis of 250mV.
AN2434 Input/Output (I/O) Pin Drivers on HCS12 Family MCUs