what is Adc_TempSenseGetTemp parameter?

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

what is Adc_TempSenseGetTemp parameter?

跳至解决方案
531 次查看
rlaxortn
Contributor IV

i am using s32ds 3.6version, and RTD 4.0.0. mcu is s32k314 172pin.

 

Adc_TempSenseGetTemp parameter has 2 parameters in adc document. 

but when i use Adc_TempSenseGetTemp function, this needs 3 parameters. 

i understand that parameters are hwunitType, tempinstance, tempvaule. 

but i don't understand tempinstance. 

tempinstance is 49? that is channel number.  or other thing?

what i input for tempinstance?

 

this is my adc config. 

3.png

5.png

 

this is function.

2.png

 

this is document.

 

 

4.png

 

 

1. i understand hwUnitType is adcHwUnit_1, and tempVaule is for returnning variable value. 

but i don't understand what i input tempinstance. channel number or other thing?

 

2. and i wanna use senser temp in MCU. 

so what process is for using temperature sensor in mcu?

i think process is

Adc_Sar_Ip_TempSenseEnable -> Adc_Sar_Ip_TempSenseGetTemp 

 

3. what is Adc_TempSenseCalculateTemp?

after use Adc_Sar_Ip_TempSenseGetTemp, do i have to use Adc_TempSenseCalculateTemp?

 

thanks to help.

标记 (3)
0 项奖励
回复
1 解答
503 次查看
Senlent
NXP TechSupport
NXP TechSupport

Hi@rlaxortn

Senlent_0-1752653202127.png

u32AdcInstance-> The ADC instance you're using right now

u32TempInstance->0, because only have one Temp Instance

pTempSenseVal->the Calculated temperature value

在原帖中查看解决方案

0 项奖励
回复
3 回复数
513 次查看
Senlent
NXP TechSupport
NXP TechSupport

Hi@rlaxortn

1.The RTD driver includes LLD and HLD, which are no-autosar and autosar compliant.

These two functions are derived from LLD and HLD respectively.

Adc_Sar_Ip_TempSenseCalculateTemp();//for lld dirver

Adc_TempSenseGetTemp ();//for hld driver

 

I have already provided you with a routine in your previous question.

https://community.nxp.com/t5/S32K/s32k344-tempsensor/m-p/2133907#M50911

 

2.yes

 

3.No.
a.Adc_Sar_Ip_TempSenseGetTemp() ->This function starts a normal software conversion with one-shot mode on tempsense channel and calculates the temperature on chip from the data conversion


b."Adc_TempSenseCalculateTemp()"->calculates the temperature based on given data(if read directly using ADC)

 

0 项奖励
回复
508 次查看
rlaxortn
Contributor IV

@Senlent 

 

my question is i don't understand what i input tempinstance. channel number or other thing?

so i show you function parameter. 

 

 

0 项奖励
回复
504 次查看
Senlent
NXP TechSupport
NXP TechSupport

Hi@rlaxortn

Senlent_0-1752653202127.png

u32AdcInstance-> The ADC instance you're using right now

u32TempInstance->0, because only have one Temp Instance

pTempSenseVal->the Calculated temperature value

0 项奖励
回复