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.
this is function.
this is document.
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.
Solved! Go to Solution.
Hi@rlaxortn
u32AdcInstance-> The ADC instance you're using right now
u32TempInstance->0, because only have one Temp Instance
pTempSenseVal->the Calculated temperature value
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)
my question is i don't understand what i input tempinstance. channel number or other thing?
so i show you function parameter.
Hi@rlaxortn
u32AdcInstance-> The ADC instance you're using right now
u32TempInstance->0, because only have one Temp Instance
pTempSenseVal->the Calculated temperature value