temperature_monitor example

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

temperature_monitor example

跳至解决方案
899 次查看
andydong1
Contributor I

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

标签 (1)
0 项奖励
1 解答
801 次查看
jingpan
NXP TechSupport
NXP TechSupport

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

在原帖中查看解决方案

0 项奖励
2 回复数
802 次查看
jingpan
NXP TechSupport
NXP TechSupport

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

0 项奖励
801 次查看
andydong1
Contributor I

Hi Jing,

Thank you so much. It works.

Best Regards,

Andy Dong

0 项奖励