Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpu/stm32: MCU implementation of the new GPIO API #14610

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

gschorcht
Copy link
Contributor

@gschorcht gschorcht commented Jul 24, 2020

Contribution description

This PR provides the MCU implementation of the low-level GPIO API in PR #14602 for STM32. It also contains necessary changes for STM32 boards.

This PR depends on and includes PR #14602. Only the commits from bd0b266 and f1f6cae are new in this PR.

Testing procedure

The following tests should be executed:

  • Flash tests/periph_gpio_exp to any STM32F1 board and test whether basic GPIO functionality is still working.
  • Flash tests/periph_gpio_exp to any STM32 board and test whether basic GPIO functionality is still working.
  • Use make -C tests/periph_gpio_exp test on any STM32F1 board to test whether the redirection to virtual GPIO expanders ports works correctly.
  • Use make -C tests/periph_gpio_exp test on any STM32 board to test whether the redirection for virtual GPIO expanders ports works correctly.
  • Use tests/periph_adc on any STM32L4 board to check whether ADC is still working.
  • Use any test that requires SPI on any STM32 board to check whether SPI is still working. If possible, it should be tested with and without hardware CS.
  • Use a Nucleo-64 board and flash examples/micropython, connect D9 (PC7) with D6 (PB10) and execute the following python instructions to test correct pin mapping in micropython:
    from machine import Pin
    p0 = Pin((2, 7), Pin.OUT)
    p1 = Pin((1, 10), Pin.IN)
    print(p0)
    print(p1)
    p0.value(1)
    print(p1.value())
    p0.value(0)
    print(p1.value())
    

The following tests might be skipped because the according peripheral is changed only slightly so that it might be enough to review the change. In these cases, only pin == GPIO_UNDEF and pin != GPIO_UNDEF were replaced by gpio_is_undef(pin) and !gpio_is_undef(pin), respectively.

  • Use tests/periph_adc on any STM32F1 board to check whether ADC is still working.
  • Use tests/periph_adc on any STM32L1 board to check whether ADC is still working.
  • Use tests/conn_can on any STM32 board that supports CAN to check whether CAN is still working.
  • Use tests/periph_i2c on any STM32F1 board to check whether I2C is still working.
  • Use tests/periph_pwm on any STM32 board to test whether PWM is still working.
  • Use tests/periph_qdec on any STM32 board that supports QDEC to check whether QDEC is still working.
  • Use tests/periph_uart on any STM32 board to check whether UART is still working.

Issues/PRs references

Depends on PR #14602

@gschorcht gschorcht added Area: boards Area: Board ports Area: cpu Area: CPU/MCU ports Platform: ARM Platform: This PR/issue effects ARM-based platforms Type: new feature The issue requests / The PR implemements a new feature for RIOT State: WIP State: The PR is still work-in-progress and its code is not in its final presentable form yet CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Jul 24, 2020
@gschorcht gschorcht force-pushed the periph/gpio_exp_v5b/cpu_stm32 branch 3 times, most recently from 61eb5ac to 273d83f Compare July 25, 2020 15:27
@gschorcht gschorcht force-pushed the periph/gpio_exp_v5b/cpu_stm32 branch 3 times, most recently from 9417a82 to 78f136f Compare July 26, 2020 11:01
@gschorcht gschorcht removed the State: WIP State: The PR is still work-in-progress and its code is not in its final presentable form yet label Jul 26, 2020
@gschorcht gschorcht force-pushed the periph/gpio_exp_v5b/cpu_stm32 branch from 78f136f to b37428f Compare July 26, 2020 15:14
@gschorcht gschorcht added the CI: run tests If set, CI server will run tests on hardware for the labeled PR label Jul 26, 2020
This change is a temporary patch to fix the compilation errors with the STM32 MCU implementation of the new low-level GPIO API until PR #3 for micropython is merged. Once this PR is merged, this patch can be dropped.
@stale
Copy link

stale bot commented Mar 19, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions.

@stale stale bot added the State: stale State: The issue / PR has no activity for >185 days label Mar 19, 2021
@gschorcht gschorcht added State: don't stale State: Tell state-bot to ignore this issue and removed State: stale State: The issue / PR has no activity for >185 days labels Mar 20, 2021
@MrKevinWeiss MrKevinWeiss added this to the Release 2021.07 milestone Jun 21, 2021
@MrKevinWeiss MrKevinWeiss removed this from the Release 2021.07 milestone Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: boards Area: Board ports Area: cpu Area: CPU/MCU ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: run tests If set, CI server will run tests on hardware for the labeled PR Platform: ARM Platform: This PR/issue effects ARM-based platforms State: don't stale State: Tell state-bot to ignore this issue Type: new feature The issue requests / The PR implemements a new feature for RIOT
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants