9405bf7a26
19412: cpu/stm32/periph: Add GPIO LL IRQ support for STM32F1 r=gschorcht a=maribu ### Contribution description As the title says ### Testing procedure <details><summary><code>make BOARD=nucleo-f103rb flash test-with-config -C tests/periph_gpio_ll</code></summary> ``` make: Entering directory '/home/maribu/Repos/software/RIOT/tests/periph_gpio_ll' Building application "tests_periph_gpio_ll" for "nucleo-f103rb" with MCU "stm32". "make" -C /home/maribu/Repos/software/RIOT/boards/common/init "make" -C /home/maribu/Repos/software/RIOT/boards/nucleo-f103rb "make" -C /home/maribu/Repos/software/RIOT/boards/common/nucleo "make" -C /home/maribu/Repos/software/RIOT/core "make" -C /home/maribu/Repos/software/RIOT/core/lib "make" -C /home/maribu/Repos/software/RIOT/cpu/stm32 "make" -C /home/maribu/Repos/software/RIOT/cpu/cortexm_common "make" -C /home/maribu/Repos/software/RIOT/cpu/cortexm_common/periph "make" -C /home/maribu/Repos/software/RIOT/cpu/stm32/periph "make" -C /home/maribu/Repos/software/RIOT/cpu/stm32/stmclk "make" -C /home/maribu/Repos/software/RIOT/cpu/stm32/vectors "make" -C /home/maribu/Repos/software/RIOT/drivers "make" -C /home/maribu/Repos/software/RIOT/drivers/periph_common "make" -C /home/maribu/Repos/software/RIOT/sys "make" -C /home/maribu/Repos/software/RIOT/sys/auto_init "make" -C /home/maribu/Repos/software/RIOT/sys/div "make" -C /home/maribu/Repos/software/RIOT/sys/frac "make" -C /home/maribu/Repos/software/RIOT/sys/isrpipe "make" -C /home/maribu/Repos/software/RIOT/sys/libc "make" -C /home/maribu/Repos/software/RIOT/sys/malloc_thread_safe "make" -C /home/maribu/Repos/software/RIOT/sys/newlib_syscalls_default "make" -C /home/maribu/Repos/software/RIOT/sys/pm_layered "make" -C /home/maribu/Repos/software/RIOT/sys/preprocessor "make" -C /home/maribu/Repos/software/RIOT/sys/stdio_uart "make" -C /home/maribu/Repos/software/RIOT/sys/test_utils/interactive_sync "make" -C /home/maribu/Repos/software/RIOT/sys/test_utils/print_stack_usage "make" -C /home/maribu/Repos/software/RIOT/sys/tsrb "make" -C /home/maribu/Repos/software/RIOT/sys/ztimer text data bss dec hex filename 20760 176 2728 23664 5c70 /home/maribu/Repos/software/RIOT/tests/periph_gpio_ll/bin/nucleo-f103rb/tests_periph_gpio_ll.elf /home/maribu/Repos/software/RIOT/dist/tools/openocd/openocd.sh flash /home/maribu/Repos/software/RIOT/tests/periph_gpio_ll/bin/nucleo-f103rb/tests_periph_gpio_ll.elf ### Flashing Target ### Open On-Chip Debugger 0.12.0+dev-snapshot (2023-03-13-08:56) Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html DEPRECATED! use 'adapter serial' not 'hla_serial' hla_swd Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD srst_only separate srst_nogate srst_open_drain connect_assert_srst Info : clock speed 1000 kHz Info : STLINK V2J29M18 (API v2) VID:PID 0483:374B Info : Target voltage: 3.252984 Info : [stm32f1x.cpu] Cortex-M3 r1p1 processor detected Info : [stm32f1x.cpu] target has 6 breakpoints, 4 watchpoints Info : starting gdb server for stm32f1x.cpu on 0 Info : Listening on port 32843 for gdb connections TargetName Type Endian TapName State -- ------------------ ---------- ------ ------------------ ------------ 0* stm32f1x.cpu hla_target little stm32f1x.cpu unknown [stm32f1x.cpu] halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x08001ae4 msp: 0x20000200 Info : device id = 0x20036410 Info : flash size = 128 KiB Warn : Adding extra erase range, 0x080051c8 .. 0x080053ff auto erase enabled wrote 20936 bytes from file /home/maribu/Repos/software/RIOT/tests/periph_gpio_ll/bin/nucleo-f103rb/tests_periph_gpio_ll.elf in 1.192543s (17.144 KiB/s) verified 20936 bytes in 0.333379s (61.328 KiB/s) shutdown command invoked Done flashing r /home/maribu/Repos/software/RIOT/dist/tools/pyterm/pyterm -p "/dev/ttyACM1" -b "115200" --no-reconnect --noprefix --no-repeat-command-on-empty-line Connect to serial port /dev/ttyACM1 Welcome to pyterm! Type '/exit' to exit. READY s START main(): This is RIOT! (Version: 2023.04-devel-685-gd0d5d-cpu/stm32/periph/gpio_ll_irq) Test / Hardware Details: ======================== Cabling: (INPUT -- OUTPUT) P2.10 (PC10) -- P1.8 (PB8) P2.12 (PC12) -- P1.9 (PB9) Number of pull resistor values supported: 1 Number of drive strengths supported: 1 Number of slew rates supported: 4 Valid GPIO ports: - PORT 0 (PORT A) - PORT 1 (PORT B) - PORT 2 (PORT C) - PORT 3 (PORT D) - PORT 4 (PORT E) Testing gpio_port_pack_addr() ============================= All OK Testing gpip_ng_init() ====================== Testing is_gpio_port_num_valid() is true for PORT_OUT and PORT_IN: Testing input configurations for PIN_IN_0: Support for input with pull up: yes state: in, pull: up, schmitt trigger: off, value: on Support for input with pull down: yes state: in, pull: down, schmitt trigger: off, value: off Support for input with pull to bus level: no Support for floating input (no pull resistors): yes state: in, pull: none, schmitt trigger: off, value: off Testing output configurations for PIN_OUT_0: Support for output (push-pull) with initial value of LOW: yes state: out-pp, slew: slowest, value: off Output is indeed LOW: yes state: out-pp, slew: slowest, value: on Output can be pushed HIGH: yes Support for output (push-pull) with initial value of HIGH: yes state: out-pp, slew: slowest, value: on Output is indeed HIGH: yes Support for output (open drain with pull up) with initial value of LOW: no Support for output (open drain with pull up) with initial value of HIGH: no Support for output (open drain) with initial value of LOW: yes state: out-od, slew: slowest, pull: none, schmitt trigger: off, value: off Output is indeed LOW: yes Support for output (open drain) with initial value of HIGH: yes state: out-od, slew: slowest, pull: none, schmitt trigger: off, value: on state: in, pull: down, schmitt trigger: off, value: off Output can indeed be pulled LOW: yes state: in, pull: up, schmitt trigger: off, value: on Output can indeed be pulled HIGH: yes Support for output (open source) with initial value of LOW: no Support for output (open source) with initial value of HIGH: no Support for output (open source with pull up) with initial value of HIGH: no Support for output (open source with pull up) with initial value of LOW: no Support for disconnecting GPIO: yes Output can indeed be pulled LOW: yes Output can indeed be pulled HIGH: yes Testing Reading/Writing GPIO Ports ================================== testing initial value of 0 after init ...OK testing setting both outputs_optional simultaneously ...OK testing clearing both outputs_optional simultaneously ...OK testing toggling first output (0 --> 1) ...OK testing toggling first output (1 --> 0) ...OK testing toggling second output (0 --> 1) ...OK testing toggling second output (1 --> 0) ...OK testing setting first output and clearing second with write ...OK testing setting second output and clearing first with write ...OK All input/output operations worked as expected Testing External IRQs ===================== Testing rising edge on PIN_IN_0 ... OK Testing falling edge on PIN_IN_0 ... OK Testing both edges on PIN_IN_0 ... OK Testing masking of IRQs (still both edges on PIN_IN_0) ... OK Testing level-triggered on HIGH on PIN_IN_0 (when input is LOW when setting up IRQ) ... OK Testing level-triggered on HIGH on PIN_IN_0 (when input is HIGH when setting up IRQ) ... OK Testing level-triggered on LOW on PIN_IN_0 (when input is HIGH when setting up IRQ) ... OK Testing level-triggered on LOW on PIN_IN_0 (when input is LOW when setting up IRQ) ... OK TEST SUCCEEDED ``` </details> ### Issues/PRs references Depends on https://github.com/RIOT-OS/RIOT/pull/19407 Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de> |
||
---|---|---|
.cargo | ||
.github | ||
.vscode | ||
boards | ||
bootloaders | ||
core | ||
cpu | ||
dist | ||
doc | ||
drivers | ||
examples | ||
fuzzing | ||
kconfigs | ||
makefiles | ||
pkg | ||
sys | ||
tests | ||
.bandit | ||
.gitattributes | ||
.gitignore | ||
.mailmap | ||
.murdock | ||
.murdock.yml | ||
bors.toml | ||
CITATION.cff | ||
CODE_OF_CONDUCT.md | ||
CODEOWNERS | ||
CODING_CONVENTIONS_C++.md | ||
CODING_CONVENTIONS.md | ||
CONTRIBUTING.md | ||
doc.txt | ||
Kconfig | ||
LICENSE | ||
LOSTANDFOUND.md | ||
MAINTAINING.md | ||
Makefile | ||
Makefile.base | ||
Makefile.dep | ||
Makefile.features | ||
Makefile.include | ||
README.md | ||
release-notes.txt | ||
SECURITY.md | ||
SUBSYSTEMS.md | ||
uncrustify-riot.cfg | ||
Vagrantfile |
The friendly Operating System for IoT!
RIOT is a real-time multi-threading operating system that supports a range of devices that are typically found in the Internet of Things (IoT): 8-bit, 16-bit and 32-bit microcontrollers.
RIOT is based on the following design principles: energy-efficiency, real-time capabilities, small memory footprint, modularity, and uniform API access, independent of the underlying hardware (this API offers partial POSIX compliance).
RIOT is developed by an international open source community which is independent of specific vendors (e.g. similarly to the Linux community). RIOT is licensed with LGPLv2.1, a copyleft license which fosters indirect business models around the free open-source software platform provided by RIOT, e.g. it is possible to link closed-source code with the LGPL code.
FEATURES
RIOT provides features including, but not limited to:
- a preemptive, tickless scheduler with priorities
- flexible memory management
- high resolution, long-term timers
- MTD abstraction layer
- File System integration
- support 200+ boards based on AVR, MSP430, ESP8266, ESP32, RISC-V, ARM7 and ARM Cortex-M
- the native port allows to run RIOT as-is on Linux and BSD. Multiple instances of RIOT running on a single machine can also be interconnected via a simple virtual Ethernet bridge or via a simulated IEEE 802.15.4 network (ZEP)
- IPv6
- 6LoWPAN (RFC4944, RFC6282, and RFC6775)
- UDP
- RPL (storing mode, P2P mode)
- CoAP
- OTA updates via SUIT
- MQTT
- USB (device mode)
- Display / Touchscreen support
- CCN-Lite
- LoRaWAN
- UWB
- Bluetooth (BLE) via NimBLE
GETTING RIOT
The most convenient way to get RIOT is to clone it via Git
$ git clone https://github.com/RIOT-OS/RIOT
this will ensure that you get all the newest features and bug fixes with the caveat of an ever changing work environment.
If you prefer things more stable, you can download the source code of one of our quarter annual releases via Github as ZIP file or tarball. You can also checkout a release in a cloned Git repository using
$ git pull --tags
$ git checkout <YYYY.MM>
For more details on our release cycle, check our documentation.
GETTING STARTED
- You want to start the RIOT? Just follow our quickstart guide or try this tutorial. For specific toolchain installation, follow instructions in the getting started page.
- The RIOT API itself can be built from the code using doxygen. The latest version of the documentation is uploaded daily to doc.riot-os.org.
FORUM
Do you have a question, want to discuss a new feature, or just want to present your latest project using RIOT? Come over to our forum and post to your hearts content.
CONTRIBUTE
To contribute something to RIOT, please refer to our contributing document.
MAILING LISTS
- RIOT commits: commits@riot-os.org
- Github notifications: notifications@riot-os.org
LICENSE
- Most of the code developed by the RIOT community is licensed under the GNU Lesser General Public License (LGPL) version 2.1 as published by the Free Software Foundation.
- Some external sources, especially files developed by SICS are published under a separate license.
All code files contain licensing information.
For more information, see the RIOT website: