Reading the internal temperature of S32K388 using TEMPSENSE module

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

Reading the internal temperature of S32K388 using TEMPSENSE module

2,797件の閲覧回数
punithchandra
Contributor IV

Hi Team,

We are using the S32K388 MCU. We have a developed a piece of code to read the temperature of the MCU using the available TEMPSENSE module of S32K388.

 

The required MCAL modules are configured including the ADC. We have enabled the below marked parameters as per the user manual. We are testing this on S32K388 Evaluation board.

punithchandra_0-1710314515674.png

 


We are having the UART command so that when the user types the command from the serial terminal, the MCU software reads that command and then reads the internal temperature of MCU using the API Adc_TempSenseCalculateTemp and prints the read results.



As the document says, the read value from the above API is in fixed point format. I have converted these values to the floating point value and printed both the values in the serial terminal.

punithchandra_1-1710314515089.png

 

Below is the command log copy (read multiple times continuously). The yellow highlighted values are converted floating point values while the blue ones are the fixed format value read from the above API.

punithchandra_2-1710314515045.png

 

 

I have observed that the read values change drastically, and the values are ranging from 120 degree centigrades to 190 centigrades. And I doubt that the read values are not correct.

 

Could you please check and let us know your opinion on the above values?

 

Also, I checked the result register for the temperature sensor (ADC channel 49) which is ICDR17 and it' s value keeps changing continuously.

Coming to the configuration we have configured one ADC channel where we have connected external temperature sensor and we are enabling the group conversion, wait for the end of conversion notification function for this group, read the result. Once we readout the external temperature sensor value, then call the function Adc_TempSenseGetTemp to get the temperature from the MCU TEMPSENS module. Since the manual says that the above function is a synchronous call which enables the temperature ADC channel 49, start the conversion, wait for the conversion to complete, read the ADC values, calculate the temperature based on the read value, disables the ADC channel 49 we haven't configured the ADC channel 49 separately.

0 件の賞賛
返信
22 返答(返信)

1,854件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

Short update - RTD team is working on this, we push them to fix it as soon as possible.

0 件の賞賛
返信

145件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

I'm sorry, still waiting. I will let you know as soon as I get the feedback.

0 件の賞賛
返信