app: remove SoC-specific code

The STM32 bootloader entry function as well as the flash size and page
size variables were only used by ThingSet items of the DFU group, which
were removed with the switch to the ThingSet SDK. The unused code is
removed together with mcu.h and the obsolete HW_LOG_LEVEL option.

The USB-C dead battery pull-downs of the STM32G4 are already disabled by
the Zephyr SoC initialization if USB device support is not enabled, so
the register access in setup() is not necessary anymore.

The DC/DC duty cycle step size depending on the SoC series is moved from
the code to the new Kconfig option DCDC_DUTY_STEP_SIZE with the same
defaults.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Martin Jäger
2026-11-01 14:50:56 +01:00
co-authored by Claude Opus 5.5
parent b90be36dbc
commit 93f142d32d
8 changed files with 26 additions and 128 deletions
+3 -8
View File
@@ -35,12 +35,6 @@ LOG_MODULE_REGISTER(dcdc, CONFIG_DCDC_LOG_LEVEL);
#define BOOST_DUTY_POWER_DECREASE (1)
#define BOOST_DUTY_POWER_INCREASE (-1)
#ifdef CONFIG_SOC_SERIES_STM32G4X
#define DUTY_STEP_SIZE (3) // increased step size for fast microcontroller
#else
#define DUTY_STEP_SIZE (1) // single minimum step for other microcontrollers
#endif
#if DT_NODE_EXISTS(DT_CHILD(DT_PATH(outputs), hv_out))
#define HV_OUT_NODE DT_CHILD(DT_PATH(outputs), hv_out)
#endif
@@ -301,8 +295,9 @@ __weak void Dcdc::control()
}
if (pwm_direction != 0) {
half_bridge_set_compare(half_bridge, half_bridge_get_compare(half_bridge)
+ pwm_direction * DUTY_STEP_SIZE);
half_bridge_set_compare(half_bridge,
half_bridge_get_compare(half_bridge)
+ pwm_direction * CONFIG_DCDC_DUTY_STEP_SIZE);
// requires floating point support with CONFIG_CBPRINTF_FP_SUPPORT=y
LOG_DBG("P %.2fW, inductor %.2fA, HS: %.2fV, %.2fA margin, "