2021-01-08 10:11 AM
We are using the latest MCSDK on some custom hardware and our hardware design has inverted shunt signals from the design examples. An inverted shunt signal obviously won't work properly with the motor controller code.
I have been looking in the software where to make a change that would invert the signal but I am not having much luck. Does anyone know where I need to make the changes in the motor controller code to invert the signal and allow everything to work?
2021-02-28 07:52 PM
Dear @RDodr.1
Do you still search where this signal has to be inverted in the SW?
Best Regards
==
Laurent Ca...
2021-03-18 09:02 AM
We had to make other hardware changes so we just inverted the signals in hardware. I did try to invert in software but it did not work for some reason.
2021-03-18 11:15 AM
Hardware is a more efficient way of doing that but I had to invert voltage recently.
For the future, what you can do is to take the original value and subtract it from the maximum value (power of 2).
At least for unsigned values.
2021-06-01 01:52 AM
The question has been set only to the "STM32 Motor Control" topic (the question is only about the STM32 SDK).
Best regards
Laurent Ca...
2021-06-01 09:31 AM
Hi, I also have the same problem. In my custom board the shunt voltage is amplified inverted from as expected from MCSDK. Where exactly in the MCSDK software the ADC is read to get the phase currents?
Another problem is the offset voltage. It is 1.71V for the X-NUCLEO-IHM08M1 and 1.56V for the X-NUCLEO-IHM16M1. Where to specify the offset voltage of the shunt amplifier? Where it is processed in the firmware?
Why didn't ST use 1.65V (VCC/2) for the offset voltage? As usual.