]> git.ipfire.org Git - thirdparty/qemu.git/commit
tests/qtest: Add STM32L4x5 GPIO QTest testcase
authorInès Varhol <ines.varhol@telecom-paris.fr>
Tue, 5 Mar 2024 21:03:12 +0000 (22:03 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 7 Mar 2024 12:19:25 +0000 (12:19 +0000)
commitddcc4b4b5250f800d500ef1217b28c39812bac2a
tree71d06c1d9be185eef3163e24b027bb7244e2fa34
parent1c38129de8a7f3d62ad2800758d9b2ddfccbdca9
tests/qtest: Add STM32L4x5 GPIO QTest testcase

The testcase contains :
- `test_idr_reset_value()` :
Checks the reset values of MODER, OTYPER, PUPDR, ODR and IDR.
- `test_gpio_output_mode()` :
Checks that writing a bit in register ODR results in the corresponding
pin rising or lowering, if this pin is configured in output mode.
- `test_gpio_input_mode()` :
Checks that a input pin set high or low externally results
in the pin rising and lowering.
- `test_pull_up_pull_down()` :
Checks that a floating pin in pull-up/down mode is actually high/down.
- `test_push_pull()` :
Checks that a pin set externally is disconnected when configured in
push-pull output mode, and can't be set externally while in this mode.
- `test_open_drain()` :
Checks that a pin set externally high is disconnected when configured
in open-drain output mode, and can't be set high while in this mode.
- `test_bsrr_brr()` :
Checks that writing to BSRR and BRR has the desired result in ODR.
- `test_clock_enable()` :
Checks that GPIO clock is at the right frequency after enabling it.

Acked-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Arnaud Minier <arnaud.minier@telecom-paris.fr>
Signed-off-by: Inès Varhol <ines.varhol@telecom-paris.fr>
Message-id: 20240305210444.310665-4-ines.varhol@telecom-paris.fr
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
tests/qtest/meson.build
tests/qtest/stm32l4x5_gpio-test.c [new file with mode: 0644]