LaunchXL-f28379D internal temperature sensor

3 views (last 30 days)
Borja
Borja on 20 Feb 2024
Answered: Borja on 16 Apr 2024
Hi there,
I'm trying to read the internal temperatrure sensor of a LaunchXL-f28379D board from Simulink, but the temperature value makes absolutely no sense for me.
Below the code I've made:
Section 11.13.5 of reference manual refers to F2837xD_TempSensorConv.c file to adapting the temperature. What I've done above is just the conversion into Simulink of the calculations of function int16 GetTemperatureC(int16 sensorSample)
Is there any example about how the adapt this?
Best regards,
Borja

Answers (2)

Manikanta Aditya
Manikanta Aditya on 28 Feb 2024
Hi Borja,
Looks like you are trying to read the internal temperature sensor of a Launch XL-f28379D board using Simulink but the temperature values you’re getting don’t seem correct.
As of now there are no exact or relevant MathWorks examples on the issue you mentioned. But I was able to find some TI support forums somewhat related to the problem which can help you to start with the troubleshooting the issue at hand.
Check the following references to know more about:
Here the user was getting incorrect ADC values when trying to measure temperature sensors with the LaunchPadXL F28379D using Simulink. The issue was resolved by considering the ADC VREF being at 3.0 V instead of 3.3 V.
Here’s the calculation they used: 2378 * (3.0/ 4096) = 1.74 V, which matched the multimeter reading. This might not be the exact solution to your problem, but it could potentially help you in troubleshooting the issue.
Hope this helps.

Borja
Borja on 16 Apr 2024
Thanks for the answer and sorry for the late response.
I think that the issue is not related with the VREFHI value... In the page 1628 of TMS320F2837xD Technical Reference Manual it is said that:
"Note that this function assumes that the temperature reading is taken with VREFHI = 2.5V. If a different reference voltage is used, the sample can be scaled appropriately before passing the sample to the function by using the following formula:
adjusted sensor reading = raw sensor reading * (VREFHI / 2.5V)"
For that reason I included the gain "3/2.5" just after the ADC block output.
Does anyone know if the ENABLE bit in the TSNSCTL register is set automatically when ADCIN13 is configured on ADCA from Simulink?
Regards,
Borja

Products


Release

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!