There shall be no special case for inverted PWM pulse when checking
if the captured value is correct.
The output signal inversion is done in HW (at least for stm32h7xx)
SoC. The measured value of the pulse shall be the same - no matter
if we invert the signal or not (as measuring also takes into account
the inversion of the output/input signal).
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Without this change the information about PWM polarity is lost when
flags are passed, as the out.flags is set according to PWM description
in the DTS.
For example in: pwms = <&pwm2 2 0 PWM_POLARITY_NORMAL> the out.flags
is always set to PWM_POLARITY_NORMAL.
However, some tests - like 'test_pulse_capture_inverted' require testing
if PWM driver is able to invert the generated signal.
After this change, the generated waveform (from the TIMx pin) is
inverted.
Tested on: Nucleo 'nucleo_h743zi' board (TIM2 ch2 -> out, TIM5 ch1 <- in)
Signed-off-by: Lukasz Majewski <lukma@denx.de>
This commit allows testing the PWM (timers) on the
nucleo_h743zi development board.
The HW setup for testing:
Timer2 (channel 2) as PWM signal generator -> CN11 connector
(PIN 30)
Timer5 (channel1) in Capture mode to measure the pulse
duration -> CN11 connector (PIN28)
Such setup allows easy HW loopback connection (just short cut two
consecutive pins/soldering vias on the devel board's PCB).
Signed-off-by: Lukasz Majewski <lukma@denx.de>
Add the pinctrl state name (default) for the PWM peripherals.
Changes performed based on the script proposed in
"boards: arm: stm32: add pinctrl state name for UART peripheral"
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Add overlay file for disco_l475_iot1 board to pwm_loopback test.
The file is based on the existing overlays for twr_ke18f and frdm_k64f.
The new configuration uses both a 16-Bit timer with active prescaler
as well as a 32-Bit timer with deactivated prescaler for coverage.
It is assumed that other STM32 boards will behave like the
disco_l475_iot1. Only this board was available for testing.
Signed-off-by: Tilmann Unte <unte@es-augsburg.de>
Adds a new zassert to check whether PWM capture has previously been
enabled and correctly returns -EBUSY on a second call.
While working on #39694 this was found to be a missing test case.
The new test case has been verified against the suggested changes of
that PR.
Signed-off-by: Tilmann Unte <unte@es-augsburg.de>
Move to CMake 3.20.0.
At the Toolchain WG it was decided to move to CMake 3.20.0.
The main reason for increasing CMake version is better toolchain
support.
Better toolchain support is added in the following CMake versions:
- armclang, CMake 3.15
- Intel oneAPI, CMake 3.20
- IAR, CMake 3.15 and 3.20
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
This is now failing an edtlib check for unknown vendor prefixes.
I can't find a reason to use a vendor prefix in application-local
bindings like this, so just remove it wherever it appears by
normalizing to test-foo-compat instead of test,foo_compat or
test,foo-compat.
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Add pinctrl-0 properties for configuration of UART, I2C, SPI, FTM,
DAC, ADC, ACMP, and PWT peripherals. These settings are based on what
is defined in the board/pinmux.c file.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Fix#32918 [Coverity CID :219528] "Arguments in wrong order
in tests/drivers/pwm/pwm_loopback/src/main.c"
Signed-off-by: Guðni Már Gilbert <gudni.m.g@gmail.com>
Add support for testing the NXP Kinetis Pulse Width Timer (PWT) on the
NXP TWR-KE18F development board using PWM loopback.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>