temperature_monitor example

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

temperature_monitor example

ソリューションへジャンプ
935件の閲覧回数
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 解決策
837件の閲覧回数
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 返答(返信)
838件の閲覧回数
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 件の賞賛
837件の閲覧回数
andydong1
Contributor I

Hi Jing,

Thank you so much. It works.

Best Regards,

Andy Dong

0 件の賞賛