From e2f4f2e82b0f384fa6824a97c4dc193e2660f0ff Mon Sep 17 00:00:00 2001 From: stancecoke Date: Sun, 23 Jun 2024 13:57:02 +0200 Subject: [PATCH] switch off speed PLL --- Inc/config.h | 2 +- Src/main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Inc/config.h b/Inc/config.h index 22c696f5..5404bb02 100644 --- a/Inc/config.h +++ b/Inc/config.h @@ -36,7 +36,7 @@ //#define INDIVIDUAL_MODES //#define SPEEDTHROTTLE #define SIXSTEPTHRESHOLD 20000 -#define SPEED_PLL 1 //1 for using PLL, 0 for angle extrapolation +#define SPEED_PLL 0 //1 for using PLL, 0 for angle extrapolation #define P_FACTOR_PLL 10 #define I_FACTOR_PLL 10 diff --git a/Src/main.c b/Src/main.c index bf62fded..ad3bd569 100644 --- a/Src/main.c +++ b/Src/main.c @@ -500,7 +500,7 @@ int main(void) ui16_ph1_offset=temp1>>5; ui16_ph2_offset=temp2>>5; ui16_ph3_offset=temp3>>5; - ui16_throttle_offset=(temp4>>5)+3; + ui16_throttle_offset=(temp4>>5)+5; #ifdef DISABLE_DYNAMIC_ADC // set injected channel with offsets ADC1->JSQR=0b00100000000000000000; //ADC1 injected reads phase A JL = 0b00, JSQ4 = 0b00100 (decimal 4 = channel 4)