From 3396b7f506b0c619aa1569540321fd12b926dee3 Mon Sep 17 00:00:00 2001 From: but0n Date: Fri, 2 Dec 2016 12:03:57 +0800 Subject: [PATCH] [MOD]: Changed the Rate of BLDC from 500Hz to 50Hz, 1ms-LOW, 2ms-HIGH --- libs/include/motor.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/libs/include/motor.h b/libs/include/motor.h index 1f7639c..edb3364 100644 --- a/libs/include/motor.h +++ b/libs/include/motor.h @@ -9,14 +9,17 @@ #define MOTOR3 TIM3->CCR3 #define MOTOR4 TIM3->CCR4 -#define MOTOR_MAX (unsigned short)34200 -#define MOTOR_MIN (unsigned short)12600 -#define MOTOR_LOW (unsigned short)18720 +#define MOTOR_MAX (unsigned short)36000 +#define MOTOR_MIN (unsigned short)18000 +#define MOTOR_LOW (unsigned short)18000 #ifdef MOTOR_NORMAL_STARTUP #define MOTOR_SETTING() {\ - motor_PWM_Init(36000,4);\ - MOTOR1 = MOTOR2 = MOTOR3 = MOTOR4 = MOTOR_MIN;\ + motor_PWM_Init(36000,40);\ + MOTOR1 = MOTOR_MIN;\ + MOTOR2 = MOTOR_MIN;\ + MOTOR3 = MOTOR_MIN;\ + MOTOR4 = MOTOR_MIN;\ delay(10000);\ } #else