Hi,
I use imxrt1052 evkboard (SDK version 2.5.0)
I test the temperaturemonitor example but it's a little bit strange.
1. when the temperature is higher than DEMO_HIGHALARMTEMP(42U)
DEMO_TEMP_LOW_HIGH_IRQHandler() is triggered and then it will decrease the core frequency
2. when the temperature is lower than DEMO_LOWALARMTEMP(40U)
DEMO_TEMP_LOW_HIGH_IRQHandler() is triggered and then it will change the core frequency to original.
I run the example. I use hairdryer to increase the temperature.
1. happened when the temperature is higher than 42.
and then 2. didn't happened when the temperature is lower than 40.
Is there any suggestions ?
Thanks.
Best Regards,
Andy Dong
解決済! 解決策の投稿を見る。
Hi Andy,
It seems the TEMPMON driver has a bug. Please modify the function TEMPMON_SetTempAlarm() as below:
switch (alarmMode)
{
case kTEMPMON_HighAlarmMode:
/* Set high alarm temperature code value */
base->TEMPSENSE0 &= 0xfffff; //clear first
base->TEMPSENSE0 |= TEMPMON_TEMPSENSE0_ALARM_VALUE(tempCodeVal);
break;
case kTEMPMON_PanicAlarmMode:
/* Set panic alarm temperature code value */
base->TEMPSENSE2 &= 0xffff;
base->TEMPSENSE2 |= TEMPMON_TEMPSENSE2_PANIC_ALARM_VALUE(tempCodeVal);
break;
case kTEMPMON_LowAlarmMode:
/* Set low alarm temperature code value */
base->TEMPSENSE2 &= 0xffff0000;
base->TEMPSENSE2 |= TEMPMON_TEMPSENSE2_LOW_ALARM_VALUE(tempCodeVal);
break;
default:
assert(false);
break;
}
Regards,
Jing
Hi Andy,
It seems the TEMPMON driver has a bug. Please modify the function TEMPMON_SetTempAlarm() as below:
switch (alarmMode)
{
case kTEMPMON_HighAlarmMode:
/* Set high alarm temperature code value */
base->TEMPSENSE0 &= 0xfffff; //clear first
base->TEMPSENSE0 |= TEMPMON_TEMPSENSE0_ALARM_VALUE(tempCodeVal);
break;
case kTEMPMON_PanicAlarmMode:
/* Set panic alarm temperature code value */
base->TEMPSENSE2 &= 0xffff;
base->TEMPSENSE2 |= TEMPMON_TEMPSENSE2_PANIC_ALARM_VALUE(tempCodeVal);
break;
case kTEMPMON_LowAlarmMode:
/* Set low alarm temperature code value */
base->TEMPSENSE2 &= 0xffff0000;
base->TEMPSENSE2 |= TEMPMON_TEMPSENSE2_LOW_ALARM_VALUE(tempCodeVal);
break;
default:
assert(false);
break;
}
Regards,
Jing
Hi Jing,
Thank you so much. It works.
Best Regards,
Andy Dong