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 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