From 5fd0f2df04ba94dfe954aa1b6f3496d55325bcc0 Mon Sep 17 00:00:00 2001 From: Jacob Dahl <37091262+dakejahl@users.noreply.github.com> Date: Sat, 25 Jan 2025 08:00:18 -0900 Subject: [PATCH 1/2] h7: enable ports H and I (#14199) * h7: enable ports H and I * Update src/platform/STM32/target/STM32H743/target.h Co-authored-by: Mark Haslinghuis --------- Co-authored-by: Mark Haslinghuis --- src/platform/STM32/target/STM32H743/target.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/platform/STM32/target/STM32H743/target.h b/src/platform/STM32/target/STM32H743/target.h index a1ed4202de..cca95f214f 100644 --- a/src/platform/STM32/target/STM32H743/target.h +++ b/src/platform/STM32/target/STM32H743/target.h @@ -59,6 +59,8 @@ #define TARGET_IO_PORTE 0xffff #define TARGET_IO_PORTF 0xffff #define TARGET_IO_PORTG 0xffff +#define TARGET_IO_PORTH 0xffff +#define TARGET_IO_PORTI 0xffff #define USE_I2C #define I2C_FULL_RECONFIGURABILITY From deb691bfc87b09fd678d482abef19d1d7a0c28aa Mon Sep 17 00:00:00 2001 From: Jay Blackman Date: Sun, 26 Jan 2025 04:01:17 +1100 Subject: [PATCH 2/2] FIX: Missing IFDEF USE_TIMER and USE_RPM_FILTER (#14201) --- src/main/config/config.c | 2 +- src/main/drivers/dshot.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/config/config.c b/src/main/config/config.c index 2c8295ebcc..002797cec0 100644 --- a/src/main/config/config.c +++ b/src/main/config/config.c @@ -452,7 +452,7 @@ static void validateAndFixConfig(void) motorConfigMutable()->dev.useContinuousUpdate = false; } -#if defined(USE_DSHOT_TELEMETRY) +#if defined(USE_DSHOT_TELEMETRY) && defined(USE_TIMER) bool nChannelTimerUsed = false; for (unsigned i = 0; i < getMotorCount(); i++) { const ioTag_t tag = motorConfig()->dev.ioTags[i]; diff --git a/src/main/drivers/dshot.c b/src/main/drivers/dshot.c index ec73e04327..d433240539 100644 --- a/src/main/drivers/dshot.c +++ b/src/main/drivers/dshot.c @@ -161,12 +161,16 @@ void initDshotTelemetry(const timeUs_t looptimeUs) // erpmToHz is used by bidir dshot and ESC telemetry erpmToHz = ERPM_PER_LSB / SECONDS_PER_MINUTE / (motorConfig()->motorPoleCount / 2.0f); +#ifdef USE_RPM_FILTER if (motorConfig()->dev.useDshotTelemetry) { // init LPFs for RPM data for (unsigned i = 0; i < dshotMotorCount; i++) { pt1FilterInit(&motorFreqLpf[i], pt1FilterGain(rpmFilterConfig()->rpm_filter_lpf_hz, looptimeUs * 1e-6f)); } } +#else + UNUSED(looptimeUs); +#endif } static uint32_t dshot_decode_eRPM_telemetry_value(uint16_t value)