Community Translation - Calculate Die Temperature with DieTemp Component in PSoC 4 - KBA229527

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

I'd like to translate this KBA229527 into Japanese.

moto

Original KBA: KBA229527

Calculate Die Temperature with DieTemp Component in PSoC 4 - KBA229527

Translated by: MoTa_728816

==============================

タイトル: PSoC 4 DieTemp コンポーネントを使用してダイの温度を計算する方法 - KBA229527

PSoC® Creator™ に内蔵されているサンプルコード  “ADC_SAR_Seq_DieTemp” は Sequencing SAR ADC コンポーネントをインジェクションチャネルと Die Temperature Component (DieTemp) と合わせて使用する方法を説明しています。しかし、正確な温度を取得する方法はデバイスファミリによって異なります。

PSoC 4100 / 4200 / 4100 BLE / 4200 BLE / 4100M / 4200M / 4200L ファミリ:

これらのデバイスでは、内部の(internal) Vref は 1.024V です。SAR ADC の Vref が内蔵の 1.024 V を選択していない場合、正しいダイの温度を得るために、サンプルコードで使用されている調整方法を使用してください。詳細については PSoC 4 DieTemp datasheet​  の “Function Description” の節をご参照ください。

PSoC 4100S / 4100S Plus ファミリ:

これらのデバイスでは、内部の Vref は 1.2V です;そのため、サンプルコードの調整方法は PSoC 4100S / 4100S Plus には適合しません。正しいダイの温度を取得するのには以下の方法に従ってください。 u32DieTempGet(void) 関数は正しいダイの温度を返します。この関数は main の while loop 内で呼び出すことが可能です。

int32 u32DieTempGet(void)

    {

      int16 adc_count;

      uint32 u32_regTemp;

      int32 Celsius;

     u32_regTemp = CY_GET_REG32(0x403A0000u);

     CY_SET_REG32(0x403A0000u, ((u32_regTemp & 0xFFFFFF00u) | 0x00000040u)); /* ダイ温度の測定前に、ADC の Vref 接続を内部 Vref (1.2V) に変更する。*/

  

     ADC_EnableInjection(); /* インジェクションチャネルを有効にする */

     ADC_StartConvert();    /* ADC 変換開始 */

     while(0u == ADC_IsEndConversion(ADC_RETURN_STATUS_INJ)){}

     adc_count = ADC_GetResult16((uint32)INJ_CHN);

     /* Vref が内部 vref (1.2V) に変更されているので、ADC のカウント調整/キャリブレーションは不要 */

          

     Celsius = DieTemp_CountsTo_Celsius(adc_count); /* セッ氏温度を取得 */

            

     CY_SET_REG32(0x403A0000u, u32_regTemp); /* 測定終了後、ADC の vref を元の接続に戻す。*/

      return Celsius;

    }

0x403A000u は PSoC 4100S / 4100S Plus の SAR_CTRL レジスタのアドレスです。SAR_CTRL のビット [6:4] は ADC の Vref 接続制御に使用されています。台の温度を測定する前に、Vref 接続を 内部 1.2V に変更します。測定終了後、通常の測定用に元の Vref 接続に復旧します。レジスタに関する説明は PSoC 4100S PSoC 4100S Plus​ Register Technical Reference Manual (TRM) に記載されています。

より詳細な情報については、Cypress community を訪れるか Cypress のセールスチームにコンタクトをしてください。

参考文献:

PSoC 4 Die Temperature

PSOC 4100S Family PSOC® 4 Registers Technical Reference Manual (TRM)

PSOC 4100S Plus Family PSOC® 4 Registers Technical Reference Manual (TRM)

==============================

6-Apr-2020

moto

0 Likes
2 Replies
JennaJo
Moderator
Moderator
Moderator
1000 replies posted 750 replies posted 500 replies posted

Hello, Tanaka-san

We receive your translation, it will be published to KBA to Community.

After upload, You will receive the points as the word of KBA.

Please bear with me for the delayed the response,

Thanks for your contribution to CDC!

Will keep you update the status.

Thanks,

Jenna Jo

Jenna Jo
JennaJo
Moderator
Moderator
Moderator
1000 replies posted 750 replies posted 500 replies posted

Tanaka-san,

Your translation has been released.

Community Translation - Calculate Die Temperature with DieTemp Component in PSoC 4 - KBA229527

Sorry for the delayed response, and thanks for your continuous work for community.

You will receive the points at Early of May (due to internal discussion for adjusting point rule).

Please let me know if you have issues on release.

Thank  you for your contribution!

Regards,

Jenna Jo

Jenna Jo