50cd32fbbf
19397: drivers/usbdev_synopsys_dwc2: fix and reenable DMA mode r=benpicco a=gschorcht ### Contribution description This PR fixes the DMA mode for all STM32 USB OTG HS cores (including that for STM32F4xx CID 1.xxx) and reenables it. It fixes remaining problems in issue #19359. This PR includes also includes some changes that are needed to use the DMA mode: - EP number is used as defined in CMSIS (if defined) for STM32 - `periph_usbdev_hs` feature is added in Kconfig - `periph_usbdev_hs` feature is added in board definition of `stm32f429i-disc1` - largest number of available EPs is used for STM32 instead of the smallest number (to be able to use all EPs of HS peripheral) - `stm32f429i-disco` is removed from blacklist in `tests/usbus_cdc_ecm` since it uses the HS peripheral ### Testing procedure The following tests should work ```python USEMODULE=stdio_cdc_acm BOARD=stm32f429i-disc1 make -j8 -C tests/usbus_cdc_ecm flash ``` <details> <summary>Test results</summary> ```python [526755.875691] usb 1-2.2: new full-speed USB device number 106 using xhci_hcd [526755.977853] usb 1-2.2: config 1 interface 3 altsetting 1 endpoint 0x84 has invalid maxpacket 512, setting to 64 [526755.977856] usb 1-2.2: config 1 interface 3 altsetting 1 endpoint 0x2 has invalid maxpacket 512, setting to 64 [526755.978762] usb 1-2.2: New USB device found, idVendor=1209, idProduct=7d01, bcdDevice= 1.00 [526755.978764] usb 1-2.2: New USB device strings: Mfr=3, Product=2, SerialNumber=4 [526755.978766] usb 1-2.2: Product: stm32f429i-disc1 [526755.978768] usb 1-2.2: Manufacturer: RIOT-os.org [526755.978769] usb 1-2.2: SerialNumber: 7C156425A950A8EB [526755.991190] cdc_acm 1-2.2:1.0: ttyACM1: USB ACM device [526755.998131] cdc_ether 1-2.2:1.2 usb0: register 'cdc_ether' at usb-0000:00:14.0-2.2, CDC Ethernet Device, a6:f6:4a:85:1d:c9 [526756.044150] cdc_ether 1-2.2:1.2 enp0s20f0u2u2i2: renamed from usb0 ``` </details> ```python USEMODULE='stdio_cdc_acm periph_usbdev_hs_utmi' BOARD=stm32f723e-disco make -j8 -C tests/usbus_cdc_ecm flash ``` <details> <summary>Test results</summary> ```python [528733.480207] usb 1-4.3.4: reset high-speed USB device number 32 using xhci_hcd [528733.707800] usb 1-4.4: new high-speed USB device number 111 using xhci_hcd [528733.808257] usb 1-4.4: config 1 interface 0 altsetting 0 endpoint 0x81 has an invalid bInterval 255, changing to 11 [528733.808260] usb 1-4.4: config 1 interface 1 altsetting 0 bulk endpoint 0x1 has invalid maxpacket 64 [528733.808263] usb 1-4.4: config 1 interface 1 altsetting 0 bulk endpoint 0x82 has invalid maxpacket 64 [528733.808642] usb 1-4.4: New USB device found, idVendor=1209, idProduct=7d01, bcdDevice= 1.00 [528733.808645] usb 1-4.4: New USB device strings: Mfr=3, Product=2, SerialNumber=4 [528733.808647] usb 1-4.4: Product: stm32f723e-disco [528733.808649] usb 1-4.4: Manufacturer: RIOT-os.org [528733.808651] usb 1-4.4: SerialNumber: A6BAC4E1B1E0806B [528733.811988] cdc_acm 1-4.4:1.0: ttyACM1: USB ACM device [528733.814456] cdc_ether 1-4.4:1.2 usb0: register 'cdc_ether' at usb-0000:00:14.0-4.4, CDC Ethernet Device, e6:75:97:3a:74:ba [528733.854371] cdc_ether 1-4.4:1.2 enp0s20f0u4u4i2: renamed from usb0 ``` </details> ```python USEMODULE='stdio_cdc_acm periph_usbdev_hs_ulpi' BOARD=stm32f746g-disco make -j8 -C tests/usbus_cdc_ecm flash ``` <details> <summary>Test results</summary> ```python [529000.944482] usb 1-4.3.4: reset high-speed USB device number 32 using xhci_hcd [529003.728260] usb 1-4.4: new high-speed USB device number 114 using xhci_hcd [529003.833107] usb 1-4.4: config 1 interface 0 altsetting 0 endpoint 0x81 has an invalid bInterval 255, changing to 11 [529003.833111] usb 1-4.4: config 1 interface 1 altsetting 0 bulk endpoint 0x1 has invalid maxpacket 64 [529003.833113] usb 1-4.4: config 1 interface 1 altsetting 0 bulk endpoint 0x82 has invalid maxpacket 64 [529003.833743] usb 1-4.4: New USB device found, idVendor=1209, idProduct=7d00, bcdDevice= 1.00 [529003.833747] usb 1-4.4: New USB device strings: Mfr=3, Product=2, SerialNumber=4 [529003.833749] usb 1-4.4: Product: stm32f746g-disco [529003.833751] usb 1-4.4: Manufacturer: RIOT-os.org [529003.833753] usb 1-4.4: SerialNumber: 66FE8934D1A363E0 [529003.837143] cdc_acm 1-4.4:1.0: ttyACM1: USB ACM device [529003.839755] cdc_ether 1-4.4:1.2 usb0: register 'cdc_ether' at usb-0000:00:14.0-4.4, CDC Ethernet Device, 6a:88:1f:1f:b1:f0 [529003.879025] cdc_ether 1-4.4:1.2 enp0s20f0u4u4i2: renamed from usb0``` ``` </details> ### Issues/PRs references Fixes #19359 19416: cpu/rpx0xx/cmsis: Update vendor header files r=benpicco a=maribu ### Contribution description Generated new vendor header files from upstream SVD files using: ./SVDConv "$PICO_SDK_DIR"/src/rp2040/hardware_regs/rp2040.svd \ --generate=header --fields=macro --fields=enum Note: The missing `--fields=struct` flag resulted in the header no longer containing bit-fields to represent different fields within registers. While this would generally ease writing code, the RP2040 has the unpleasant feature of corrupting the remaining bits of the register when a write access that is not word-sized occurs in the memory mapped I/O area. This could happen e.g. when a bit field is byte-sized and byte-aligned. ### Testing procedure No binary changes (hopefully). ### Issues/PRs references This adds a few additional vendor defines, notably for USB. If anyone were to implement USB, this would be a requirement. 19418: cpu/gd32v: fix gpio_read in periph_gpio r=benpicco a=gschorcht ### Contribution description This PR fixes a bug in `gpio_read` which made `gpio_read` completely unusable! A small bug with big consequences. In `gpio_read` the combined port | pin_num parameter `pin` was used instead of the pin number `pin_num` for the call of `_pin_is_input`. This caused the problem that for example instead of accessing GPIOA->CTL0 with address 0x40010800, address 0x60018c00 was accessed. As a result, a pin was randomly detected as input or output and thus a result was arbitrarily returned. Approx. 50% of all inputs always returned LOW. I found this error by coincidence when I tried to find out why the BOOT0 button on a Sipeed Longan Nano is not usable as a button in RIOT. ### Testing procedure Flash `tests/periph_gpio` ``` BOARD=sipeed-longan-nano make -j8 -C tests/periph_gpio flash ``` and use commands ``` init_in 0 8 read 0 8 ``` Without this PR, the pin is always LOW. With the PR, the pin should be HIGH when the BOOT button is pressed. ### Issues/PRs references 19419: boards/sipeed-longan-nano: add BOOT as user button r=benpicco a=gschorcht ### Contribution description This PR makes the BOOT button usable as a user button. ### Testing procedure The test requires PR #19418 to work. Flash and test: ``` BOARD=sipeed-longan-nano make -j8 -C tests/saul flash term ``` The output ``` Dev: BOOT Type: SENSE_BTN Data: 0 ``` should change to ``` Dev: BOOT Type: SENSE_BTN Data: 1 ``` when the BOOT button is pressed. ### Issues/PRs references Depends on PR #19418 Co-authored-by: Gunar Schorcht <gunar@schorcht.net> 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: