what is Adc_TempSenseGetTemp parameter?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

what is Adc_TempSenseGetTemp parameter?

Jump to solution
527 Views
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.

Tags (3)
0 Kudos
Reply
1 Solution
499 Views
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

View solution in original post

0 Kudos
Reply
3 Replies
509 Views
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 Kudos
Reply
504 Views
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 Kudos
Reply
500 Views
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 Kudos
Reply