Skip to content

Commit da6310c

Browse files
michal-smolacarlescufi
authored andcommitted
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 <[email protected]>
1 parent 5183620 commit da6310c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

soc/nxp/mcx/mcxc/soc.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@ static void clock_init(void)
109109

110110
void soc_early_init_hook(void)
111111
{
112+
#ifdef CONFIG_TEMP_KINETIS
113+
/* enable bandgap buffer */
114+
PMC->REGSC |= PMC_REGSC_BGBE_MASK;
115+
#endif /* CONFIG_TEMP_KINETIS */
116+
112117
clock_init();
113118
}
114119

0 commit comments

Comments
 (0)