cancel
Showing results for 
Search instead for 
Did you mean: 

User Code in Motor Control Firmware

TKlei.5
Associate III

Hello,

at the moment i use the STEVAL-SPIN3202 board and the Motor Control SDK to drive a BLDC-motor. Now i want to implement my own function to switch off the motor if it exceeds a specific speed and current.

I don't know where i can find a variable which contains the actual speed or current of the motor?

For Example:

/* Infinite loop */

 /* USER CODE BEGIN WHILE */

 while (1)

 {

   PotentiometerHandleSpeed();

if(current >= 15 && speed >= 6000)

{

HAL_Delay(3000);

MC_StopMotor1();

}

   }

 /* USER CODE END WHILE */

1 REPLY 1
Laurent Ca...
Lead II

The question has been moved from the "Motor Control Hardware" section to the "STM32 Motor Control" section (the question is about the STM32 MC SDK). 

Best regards