I need to access the FOC code where the transformation from three phase currents to Id and Iq takes place. Also from where can I access the stator phase current data for all three phases. I want to log all three stator phase currents.
I need to access the FOC code where the transformation from three phase currents to Id and Iq takes place. Also from where can I access the stator phase current data for all three phases. I want to log all three stator phase currents.
https://github.com/vedderb/bldc/blob/master/mcpwm_foc.c
Should have what you are looking for. It is what runs the main foc loop.
As for phase currents, there is a scope like log feature that can capture a couple hundred adc readings. Perhaps that would fork for your current logging?