This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

stm32f407vg

Hi, I am using a stm32f4 discovery board to control a servo motor (Servo 6009). But, I have some problems, please help me to solve these.

- when I write " Rotation_Servo(void)", it run correctly.
void Rotation_Servo(void);
int main(void)
{ TIM_PWM_Configuration(); while(1) { Rotation_Servo(); }
} void Rotation_Servo(void) { int b=150; int a=(b + 65.5) / 0.1; TIM1->CCR1 = (uint32_t)a; Delay(60000000); }
- but when I replace: "Rotation_Servo(void)" by "void Rotation_Servo(int b)" like bellow, It can not run.
void Rotation_Servo(int b);
int main(void)
{ TIM_PWM_Configuration(); while(1) { Rotation_Servo(150); }
} void Rotation_Servo(int b) { int a=(b + 65.5) / 0.1; TIM1->CCR1 = (uint32_t)a; Delay(60000000); }

0