Verify the timing of the half-bridge outputs at the pins without requiring a charge controller, where a wrong timer configuration could destroy the power stage. The outputs of the half bridge are wired to two input capture channels of a 32-bit timer (TIM2 or TIM5) on a Nucleo-G474RE board. As both channels share the same counter, the edges of the high-side and low-side signals can be put into chronological order to measure: - frequency and duty cycle (incl. duty cycle limits) - dead time at both switching transitions of each period - overlap of high-side and low-side on-time (shoot-through) - output states when stopped and with forced low-side switch The test covers the advtim (TIM1), gptim (TIM3) and HRTIM drivers with separate overlays. It requires the half_bridge_loopback fixture, so it is only built in CI and run with a twister hardware map on a board with the loop-back wiring. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
53 lines
1.4 KiB
YAML
53 lines
1.4 KiB
YAML
# Copyright (c) The Libre Solar Project Contributors
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
description: |
|
|
Loop-back wiring for half-bridge tests on STM32
|
|
|
|
The high-side and low-side outputs of the half bridge under test are wired to two input capture
|
|
channels of a separate STM32 timer. Both channels share the same counter, so that the time
|
|
between edges of the two signals (e.g. the dead time) can be measured.
|
|
|
|
compatible: "test-half-bridge-loopback"
|
|
|
|
include: [base.yaml, pinctrl-device.yaml]
|
|
|
|
properties:
|
|
half-bridge:
|
|
type: phandle
|
|
required: true
|
|
description: Half bridge under test
|
|
|
|
capture-timer:
|
|
type: phandle
|
|
required: true
|
|
description: st,stm32-timers node of the timer used for input capture
|
|
|
|
high-side-channel:
|
|
type: int
|
|
required: true
|
|
enum: [1, 2, 3, 4]
|
|
description: Capture timer channel connected to the high-side output
|
|
|
|
low-side-channel:
|
|
type: int
|
|
required: true
|
|
enum: [1, 2, 3, 4]
|
|
description: Capture timer channel connected to the low-side output
|
|
|
|
high-side-gpios:
|
|
type: phandle-array
|
|
required: true
|
|
description: GPIO of the high-side capture input (used to read the signal level)
|
|
|
|
low-side-gpios:
|
|
type: phandle-array
|
|
required: true
|
|
description: GPIO of the low-side capture input (used to read the signal level)
|
|
|
|
pinctrl-0:
|
|
required: true
|
|
|
|
pinctrl-names:
|
|
required: true
|