In general the bandgap voltage is measured via ADC self-test mechanism.
I recommend you to read reference manual chapter 36.5.10.2 Self test (Quick-Check/Safety mode).
In the supply self-test algorithm, the band gap is measured with regard to the reference
voltage (Vrh) in step 0. The result is capable of catching mismatches between them. Step
1 measures the supply with regard to reference (Vrh), and the result is taken to do a ratio
(Vdda/Vbg). If the band gap voltage remains within +/-1.25% of its ideal value of 1.2 V,
then by setting appropriate values of THRH and THRL in watchdog registers, the ADC
self-test can catch more than 4% variation in supply and reference faithfully.