Instead of factory calibration against an external voltage (e.g. 1024mV) and adjusting Gain setting, consider using onboard reference Vref = 1.02V as input test voltage, and record measured value (e.g. Vmeasured = 0.99V). Then all data need to be corrected for coefficient: coeff = Vref/Vmeasured. This procedure can be run every time on startup (with some MUX), so no factory calibration required.
High-precision absolute voltage measurement can be tricky if better than 10^-3 resolution is needed. Usually, a stable external voltage source is used for calibration (like Mercury-Silver battery) on every measurement, as internal Vref drifts away. If accuracy of few mV is sufficient, then existing PSoC factory calibration of ADC should suffice.
record measured value (e.g. Vmeasured = 0.99V).
Can you clarify how you get those (in this case ) 0.99V ?
1- Using the same SAR_ADC ?
2- Reading the counts you get from 1.02 V ?
The values Vmeasired = "0.99V" and Vref="1.02V" are purely artificial numbers out of my head. They were provided just to clarify the idea.
On startup, lets switch mux to a pin, connected to the PSoC reference Vref=1.02V and measure signal using ADC_SAR (lets call it "Vref"). The same Vref should be used as ADC_SAR reference voltage. Ideally, if SAR-ADC is calibrated perfectly, the value returned should be 1.024V, but in reality it can be slightly off (lets say it is Vmeasured = 0.99V). This discrepancy may come from uncalibrated SAR_ADC. Now we know that every measurement returned by the SAR_ADC is off by a coefficient 0.99V/1.024V = 0.96679. Therefore, to get correct ADC values, all ADC_SAR results must be scaled up by 1.024/0.99 = 1.0343434.
As alternative procedure, you may adjust ADC_SAR Gain calibration by iterations, until measured result will become 1.024V, but i think that it is slower.