cancel
Showing results for 
Search instead for 
Did you mean: 

Reading Temperature Sensor on EVLServo1 using code

I am currently writing code for the EVLServo1 board using function calls to control the motor and send information about the motor back to a STM32H735G-DK discovery board using the FDCAN bus.  Everything seems to be working really well and I am sending back the measured speed of the motor, Iq, and power using the following function calls from the mc_api.c file:

MC_GetMecSpeedAverageMotor1() - Measured speed

MC_GetIqdMotor1_F() - Iq

MC_GetAveragePowerMotor_F() - Power

In the Motor Pilot software it also shows the temperature of the heatsink as measured by the NTC Thermistor on the board inverter board of the EVLServo1 kit.  I'd really like to be able to report this back to the STM32H735G-DK so I can display it on the screen along with the other info, however, I don't see a function call that will return this information.  Is there a function call in another file within the project I can use?  Is there some other method for doing this?

1 ACCEPTED SOLUTION

Accepted Solutions

I believe I have found the temperature function, it is not in the mc_api.c file.  What I found and appears to return the expected value is NTC_GetAvTemp(&TempSensor_M1) found in the ntc_temperature_sensor.c.  Information being returned matches what is displayed in Motor Pilot.

View solution in original post

1 REPLY 1

I believe I have found the temperature function, it is not in the mc_api.c file.  What I found and appears to return the expected value is NTC_GetAvTemp(&TempSensor_M1) found in the ntc_temperature_sensor.c.  Information being returned matches what is displayed in Motor Pilot.