Question
STM3210E-EVAL motor control example
Posted on January 18, 2012 at 17:00
Hi,
I'm trying to get a motor control example running on the mentioned board - without success. My main function looks like this: int main(void) { SystemInit(); Demo_Init(); //initialize motor control lib MCboot(oMCI, oMCT); GetMCIList(oMCI); GetMCTList(oMCT); SysTick_Configuration(); //Execute a start speed ramp MCI_ExecSpeedRamp(oMCI[0],100,1000); MCI_StartMotor(oMCI[0]); //... } Some of the called methods, I used from the IAR example project included in the motor control library. I didnt build and programmed this one, because of the code size (working with Lite version IDE). I commented out all useless functions like LCD and so on. Some further important information: - I wrote a minimal main function with a switch-case where I switched the 6 GPIOs wired to the three phase-PWMs. I just commutated the the GPIOs according to the 6 commutation states. In this way, the motor was driving! Of course this is a very quick and dirty way, but it was only to check the HW! - I checked all jumper settings with collegues several times. they should be correct. - by calling MCI_GetSTMState, I could determine, that the state machine is in START mode. Has someone a minimal MC example using the FOC MC library and could give me a hint? I some initialization missing? I think this is all done in MCboot? As the power stage I use the STEVAL-IHM031V1 board. thanks in advance sebastian