SLUSF21 june 2023 BQ79616
PRODUCTION DATA
There are eight GPIOs. All GPIO inputs are available to be used for thermistor connections for temperature measurements and be used as a simple, single-ended, voltage input measurement.
Figure 8-6 shows the thermistor circuit when GPIO is enabled for thermistor measurements. MCU ensures TSREF is enabled by setting CONTROL2[TSREF_EN] = 1 and settled before taking the measurement value.
The GPIOs are multiplexed to one of the Main ADC MUX inputs. That is, in a single round robin cycle, only one GPIO is measured. To complete all eight GPIO measurements, it takes eight round robin cycles.
To enable the GPIO for ADC measurement, the corresponding GPIO_CONFn[GPIO*2:0] (where n = 1 to 4, * = 1 to 8 for the corresponding GPIO) register is configured to ADC input or ADC and OTUT input. For example, to enable GPIO1 for ADC measurement only, set GPIO_CONF1[GPIO12:0] to ADC input. See Section 8.3.5 for more details. If a GPIO is not configured for any ADC measurement, the device will ignore the corresponding GPIO slot but does not remove the slot from the round robin cycle. See Figure 8-7 for an example when GPIO2 is configured for non-ADC measurement.
The measurements are reported in the corresponding GPIO*_HI (high-byte) and GPIO*_LO (low-byte) registers, where * = 1 to 8. The measurement result is in μV. To achieve better temperature accuracy, the MCU can use a ratiometric measurement by using both TSREF and GPIO measurement with the following formula: (GPIO_ADC/TSREF_ADC) = RNTC/(RNTC + R1), where
For an inactive GPIO channel, the respective _HI and _LO registers remain with the default value 0x8000.