TSEN(Temperature SENsor)用于测量芯片当前的温度。 HCPU 和 LCPU 都可以使用该模块来获取芯片组的当前温度。 当测量数据准备好时,它可以产生中断。
使用TSEN
以下代码将在不中断的情况下测量芯片组的温度。
int temperature;
printf("Sync: Current temperature is %d degree\n", temperature);
下面的代码将测量芯片组的温度,当测量准备好时产生一个中断。
void TSEN_IRQHandler(void)
{
LOG_I("IRQ Fired");
}
int temperature;
{
int count = 0;
}
printf(
"Async: Current temperature is %d degree\n", TsenHandle.
temperature);