From a57682a4b620ce963bef936d40da2da469298ce4 Mon Sep 17 00:00:00 2001 From: rusefillc <48498823+rusefillc@users.noreply.github.com> Date: Tue, 6 Sep 2022 19:53:22 -0400 Subject: [PATCH] Rev2 progress (#143) * Rev2: define AUX output PWM device and channels * Rev2: enalbe TIM1 used for aux outputs * Rev2: aux pwm pins: no need to be 50MHz fast Co-authored-by: Andrey Gusakov --- firmware/boards/f1_rev2/board.h | 2 +- firmware/boards/f1_rev2/io/io_pins.h | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/firmware/boards/f1_rev2/board.h b/firmware/boards/f1_rev2/board.h index 0608f9c..fcedb1b 100644 --- a/firmware/boards/f1_rev2/board.h +++ b/firmware/boards/f1_rev2/board.h @@ -112,7 +112,7 @@ * PB15 - PWMout1 (output pushpull, alternate, 2 Mhz). */ #define VAL_GPIOBCRL 0x8A888200 /* PB7...PB0 */ -#define VAL_GPIOBCRH 0xBB243488 /* PB15...PB8 */ +#define VAL_GPIOBCRH 0xAA243488 /* PB15...PB8 */ #define VAL_GPIOBODR 0x0000FFFF /* diff --git a/firmware/boards/f1_rev2/io/io_pins.h b/firmware/boards/f1_rev2/io/io_pins.h index 8006440..4d8d35f 100644 --- a/firmware/boards/f1_rev2/io/io_pins.h +++ b/firmware/boards/f1_rev2/io/io_pins.h @@ -44,6 +44,13 @@ // PB15 - TIM1_CH3N #define AUXOUT_DAC_PWM_CHANNEL_1 2 +// TIM1 - DAC for AUX outputs +#define AUXOUT_DAC_PWM_DEVICE PWMD1 +// PB14 - TIM1_CH2N +#define AUXOUT_DAC_PWM_CHANNEL_0 1 +// PB15 - TIM1_CH3N +#define AUXOUT_DAC_PWM_CHANNEL_1 2 + #define ID_SEL1_PORT GPIOC #define ID_SEL1_PIN 13