How to access Bus voltage reading in motor control software
I'm using the STM32G431 MCU to run a BLDC motor with the middleware FOC code. I'd like to be able to report the bus voltage in the system but haven't been able to find the way to access the code. I found a procedure declared in bus_voltage_sensor.c, __weak uint16_t VBS_GetAvBusVoltage_V( BusVoltageSensor_Handle_t * pHandle ) but the input is the pointer BusVoltageSensor_Handle_t*pHandle. I'm guessing this is a pointer to a structure for my motor but I don't know where it is defined.
Is using the procedure VBS_GetAvBusVoltage_V the correct approach or is there a different method to use, something closer to the UI interface?
Thanks,
Brian
