The setting of the PGA gain in manual or automatic mode can be performed by configuring ADC_CFG[PGA_GAIN] register (0x06).
The setting of the PGA gain in automatic mode will also be performed by the automatic gain control. Automatic gain control allows the device to obtain the most appropriate gain setting for the amplifier input signal level. In automatic gain control mode, the conversion result is digitally compared with internally programmed thresholds.
You might find useful information about programming/setting the MC33771 in the AN12084 (MC3371/MC33772 Programming Guide) which is available on the product website under Secure Files requiring an NDA:
In the Software section under Secure Files is also available complete BCC Software Driver: