From a2743f50e92de32c51bb09b8352ec9f58365cddc Mon Sep 17 00:00:00 2001 From: digitalentity Date: Fri, 15 May 2015 21:47:19 +1000 Subject: [PATCH] Moved buzzer to Out6 Removed PWM12 (Out6) from pwm_mapping Updated documentation --- docs/Board - CC3D.md | 2 +- docs/Buzzer.md | 6 +----- src/main/drivers/pwm_mapping.c | 8 ++++---- src/main/target/CC3D/target.h | 2 +- 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/docs/Board - CC3D.md b/docs/Board - CC3D.md index 95a7d3dfa..2a8d796a0 100644 --- a/docs/Board - CC3D.md +++ b/docs/Board - CC3D.md @@ -38,7 +38,7 @@ The 6 pin RC_Output connector has the following pinouts when used in RX_PPM/RX_S | 3 | MOTOR 3 | | | 4 | MOTOR 4 | | | 5 | LED Strip | | -| 6 | Unused | | +| 6 | Buzzer | | The 8 pin RC_Input connector has the following pinouts when used in RX_PARALLEL_PWM mode diff --git a/docs/Buzzer.md b/docs/Buzzer.md index 8e2c41afb..56e512e1d 100644 --- a/docs/Buzzer.md +++ b/docs/Buzzer.md @@ -56,8 +56,4 @@ Connect a supported buzzer directly to the BUZZ pins. Observe polarity. Also if ### CC3D -Buzzer support on the CC3D requires that a buzzer circuit be created to which the input is PA15. -PA15 is unused and not connected according to the CC3D Revision A schematic. -Connecting to PA15 requires careful soldering. - -See the [CC3D - buzzer circuit.pdf](Wiring/CC3D - buzzer circuit.pdf) for details. +Connect a supported buzzer to the '-' and 'Sig' of Pin 6 on RC_Output connector. Observe polarity. Please note that RC_Output can provide no more than 25mA current, so you should use a buzzer with rated current of no more than 25mA or use a buzzer with additional driver circuit like this one [Active Buzzer module on eBay](http://www.ebay.com/itm/221686970259) diff --git a/src/main/drivers/pwm_mapping.c b/src/main/drivers/pwm_mapping.c index 828daecb4..cfec7936d 100644 --- a/src/main/drivers/pwm_mapping.c +++ b/src/main/drivers/pwm_mapping.c @@ -151,7 +151,7 @@ static const uint16_t multiPPM[] = { PWM9 | (MAP_TO_MOTOR_OUTPUT << 8), PWM10 | (MAP_TO_MOTOR_OUTPUT << 8), PWM11 | (MAP_TO_MOTOR_OUTPUT << 8), - PWM12 | (MAP_TO_MOTOR_OUTPUT << 8), + //PWM12 | (MAP_TO_MOTOR_OUTPUT << 8), PWM2 | (MAP_TO_MOTOR_OUTPUT << 8), // Swap to servo if needed PWM3 | (MAP_TO_MOTOR_OUTPUT << 8), // Swap to servo if needed PWM4 | (MAP_TO_MOTOR_OUTPUT << 8), // Swap to servo if needed @@ -171,7 +171,7 @@ static const uint16_t multiPWM[] = { PWM9 | (MAP_TO_MOTOR_OUTPUT << 8), // motor #1 or #3 PWM10 | (MAP_TO_MOTOR_OUTPUT << 8), PWM11 | (MAP_TO_MOTOR_OUTPUT << 8), - PWM12 | (MAP_TO_MOTOR_OUTPUT << 8), // motor #4 or #6 + //PWM12 | (MAP_TO_MOTOR_OUTPUT << 8), // motor #4 or #6 0xFFFF }; @@ -182,7 +182,7 @@ static const uint16_t airPPM[] = { PWM9 | (MAP_TO_SERVO_OUTPUT << 8), PWM10 | (MAP_TO_SERVO_OUTPUT << 8), PWM11 | (MAP_TO_SERVO_OUTPUT << 8), - PWM12 | (MAP_TO_SERVO_OUTPUT << 8), + //PWM12 | (MAP_TO_SERVO_OUTPUT << 8), PWM2 | (MAP_TO_SERVO_OUTPUT << 8), PWM3 | (MAP_TO_SERVO_OUTPUT << 8), PWM4 | (MAP_TO_SERVO_OUTPUT << 8), @@ -203,7 +203,7 @@ static const uint16_t airPWM[] = { PWM9 | (MAP_TO_SERVO_OUTPUT << 8), // servo #1 PWM10 | (MAP_TO_SERVO_OUTPUT << 8), // servo #2 PWM11 | (MAP_TO_SERVO_OUTPUT << 8), // servo #3 - PWM12 | (MAP_TO_SERVO_OUTPUT << 8), // servo #4 + //PWM12 | (MAP_TO_SERVO_OUTPUT << 8), // servo #4 0xFFFF }; #endif diff --git a/src/main/target/CC3D/target.h b/src/main/target/CC3D/target.h index 2504bde7a..306d8acd3 100644 --- a/src/main/target/CC3D/target.h +++ b/src/main/target/CC3D/target.h @@ -28,7 +28,7 @@ #define INVERTER_USART USART1 #define BEEP_GPIO GPIOA -#define BEEP_PIN Pin_15 // PA15 (Beeper) +#define BEEP_PIN Pin_2 // PA2 (Beeper) #define BEEP_PERIPHERAL RCC_APB2Periph_GPIOA #define MPU6000_CS_GPIO GPIOA