soc: mcxc: Enable bandgap buffer for on die temperature measurement

Bandgap voltage is used for on die temperature measurement. Bandgap
buffer has to be enabled explicitly to get correct tempearature.
Enable the buffer if TEMP_KINETIS is selected.

Signed-off-by: Michal Smola <michal.smola@nxp.com>
This commit is contained in:
Michal Smola 2024-10-22 10:53:14 +02:00 committed by Carles Cufí
commit da6310c96c

View file

@ -109,6 +109,11 @@ static void clock_init(void)
void soc_early_init_hook(void) void soc_early_init_hook(void)
{ {
#ifdef CONFIG_TEMP_KINETIS
/* enable bandgap buffer */
PMC->REGSC |= PMC_REGSC_BGBE_MASK;
#endif /* CONFIG_TEMP_KINETIS */
clock_init(); clock_init();
} }