From 3f3cb4a7ad4d6eb0ea2ecb84480e324d3742eb0d Mon Sep 17 00:00:00 2001 From: rusefillc <48498823+rusefillc@users.noreply.github.com> Date: Tue, 5 Apr 2022 17:46:46 -0400 Subject: [PATCH 1/2] PB6 with hardware mod is the simplest way forward (#50) Co-authored-by: rusefillc --- firmware/boards/f1_dave/board.c | 2 ++ firmware/boards/f1_dave/io/io_pins.h | 9 +++++++-- firmware/boards/f1_dave/mcuconf.h | 4 ++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/firmware/boards/f1_dave/board.c b/firmware/boards/f1_dave/board.c index ac929a4..26f2829 100644 --- a/firmware/boards/f1_dave/board.c +++ b/firmware/boards/f1_dave/board.c @@ -15,6 +15,7 @@ */ #include "hal.h" +#include "io_pins.h" /** * @brief PAL setup. @@ -46,4 +47,5 @@ void __early_init(void) { * Board-specific initialization code. */ void boardInit(void) { + palSetPadMode(HEATER_PORT, HEATER_PIN, PAL_MODE_OUTPUT_PUSHPULL ); } diff --git a/firmware/boards/f1_dave/io/io_pins.h b/firmware/boards/f1_dave/io/io_pins.h index 7a64284..e0b8962 100644 --- a/firmware/boards/f1_dave/io/io_pins.h +++ b/firmware/boards/f1_dave/io/io_pins.h @@ -9,10 +9,15 @@ #define NERNST_ESR_DRIVER_PORT GPIOB #define NERNST_ESR_DRIVER_PIN 12 -// PC13 -#define HEATER_PWM_DEVICE PWMD1 +// PC13 on rev 0.1 +// exploring jumper wire from PB6 DISP3 to HEATER +// PB6 TIM4_CH1 +#define HEATER_PWM_DEVICE PWMD4 #define HEATER_PWM_CHANNEL 0 +#define HEATER_PORT GPIOB +#define HEATER_PIN 6 + // PA1 TIM2_CH2 #define PUMP_DAC_PWM_DEVICE PWMD2 #define PUMP_DAC_PWM_CHANNEL 1 diff --git a/firmware/boards/f1_dave/mcuconf.h b/firmware/boards/f1_dave/mcuconf.h index 7cbf371..6512bfa 100644 --- a/firmware/boards/f1_dave/mcuconf.h +++ b/firmware/boards/f1_dave/mcuconf.h @@ -134,10 +134,10 @@ * PWM driver system settings. */ #define STM32_PWM_USE_ADVANCED FALSE -#define STM32_PWM_USE_TIM1 TRUE +#define STM32_PWM_USE_TIM1 FALSE #define STM32_PWM_USE_TIM2 TRUE #define STM32_PWM_USE_TIM3 FALSE -#define STM32_PWM_USE_TIM4 FALSE +#define STM32_PWM_USE_TIM4 TRUE #define STM32_PWM_USE_TIM5 FALSE #define STM32_PWM_USE_TIM8 FALSE #define STM32_PWM_TIM1_IRQ_PRIORITY 7 From 636d8a30bc19cdd3347c15bcd21f81d09c691a38 Mon Sep 17 00:00:00 2001 From: rusefillc <48498823+rusefillc@users.noreply.github.com> Date: Tue, 5 Apr 2022 17:47:01 -0400 Subject: [PATCH 2/2] ChibiOS: use rusefi/master.wideband branch (#54) * ChibiOS: use rusefi/master.wideband branch * Actually update the submodule pointer --- .gitmodules | 3 ++- firmware/ChibiOS | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index caa62d3..6369a12 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,7 @@ [submodule "firmware/ChibiOS"] path = firmware/ChibiOS - url = https://github.com/ChibiOS/ChibiOS + url = https://github.com/rusefi/ChibiOS + branch = master.wideband [submodule "firmware/cmsis-svd"] path = firmware/cmsis-svd url = https://github.com/posborne/cmsis-svd diff --git a/firmware/ChibiOS b/firmware/ChibiOS index d659db7..6e4b068 160000 --- a/firmware/ChibiOS +++ b/firmware/ChibiOS @@ -1 +1 @@ -Subproject commit d659db7440a251608405f40efd73658a6e2abc8a +Subproject commit 6e4b068f71287f7d67725d00e5d3a5d53cb4ac7b