Bayley Wang / Mbed 2 deprecated foc-ed_in_the_bot_compact

Dependencies:   FastPWM3 mbed

Files at this revision

API Documentation at this revision

Comitter:
bwang
Date:
Sat Nov 10 11:18:49 2018 +0000
Parent:
236:29ee9e1ccf61
Child:
238:cf54cb197c8f
Commit message:
11/10/2018 06:18 - made PWM's non-inverting, swapped pins to match

Changed in this revision

BREMS/BREMSConfig.cpp Show annotated file Show diff for this revision Revisions of this file
CHANGELOG.txt Show annotated file Show diff for this revision Revisions of this file
hardware.h Show annotated file Show diff for this revision Revisions of this file
--- a/BREMS/BREMSConfig.cpp	Sat Nov 10 10:01:20 2018 +0000
+++ b/BREMS/BREMSConfig.cpp	Sat Nov 10 11:18:49 2018 +0000
@@ -34,7 +34,7 @@
     
     TIM1->PSC = 0x00; //no prescaler, timer counts up in sync with the peripheral clock
     TIM1->ARR = (int) (2 * (float) 9e7 / _F_SW);
-    TIM1->CCER |= ~(TIM_CCER_CC1NP); //Interupt when low side is on.
+    TIM1->CCER |= (TIM_CCER_CC1NP); //Interupt when low side is on.
     TIM1->CR1 |= TIM_CR1_CEN;
     
     //ADC Setup
--- a/CHANGELOG.txt	Sat Nov 10 10:01:20 2018 +0000
+++ b/CHANGELOG.txt	Sat Nov 10 11:18:49 2018 +0000
@@ -67,4 +67,5 @@
 11/10/2018 04:14 - 'some modes override FOC outputs' removed from commutate(), as it is no longer needed (ZERO, CHR have their own routines, CFG disables output anyway)
 11/10/2018 04:21 - cmd_setp() sets setpoint to zero if there are errors present (to avoid sudden start of motor if errors are cleared)
 11/10/2018 04:36 - bugfix to cmd_setp(), is_driving() now checks user_cmd and not torque_percent (i.e. if the pedal is down, the car is 'driving' regardless of the throttle map)
-11/10/2018 05:01 - bugfix to cmd_setp()
\ No newline at end of file
+11/10/2018 05:01 - bugfix to cmd_setp()
+11/10/2018 06:18 - made PWM's non-inverting, swapped pins to match
\ No newline at end of file
--- a/hardware.h	Sat Nov 10 10:01:20 2018 +0000
+++ b/hardware.h	Sat Nov 10 11:18:49 2018 +0000
@@ -1,9 +1,9 @@
 #ifndef __LAYOUT_H
 #define __LAYOUT_H
 
-#define PWMA PA_9
-#define PWMB PA_10
-#define PWMC PA_8
+#define PWMA PA_8
+#define PWMB PA_9
+#define PWMC PA_10
 #define EN PB_15
 
 #define IA PA_4