LaunchXL-f28379D internal temperature sensor

3 次查看(过去 30 天)
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

回答(2 个)

Manikanta Aditya
Manikanta Aditya 2024-2-28
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 2024-4-16
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

产品


版本

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by