mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
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> |
||
---|---|---|
.. | ||
acd52832 | ||
adafruit-clue | ||
adafruit-itsybitsy-m4 | ||
adafruit-itsybitsy-nrf52 | ||
adafruit-pybadge | ||
airfy-beacon | ||
alientek-pandora | ||
arduino-due | ||
arduino-duemilanove | ||
arduino-leonardo | ||
arduino-mega2560 | ||
arduino-mkr1000 | ||
arduino-mkrfox1200 | ||
arduino-mkrwan1300 | ||
arduino-mkrzero | ||
arduino-nano | ||
arduino-nano-33-ble | ||
arduino-nano-33-iot | ||
arduino-uno | ||
arduino-zero | ||
atmega256rfr2-xpro | ||
atmega328p | ||
atmega328p-xplained-mini | ||
atmega1284p | ||
atxmega-a1-xplained | ||
atxmega-a1u-xpro | ||
atxmega-a3bu-xplained | ||
avr-rss2 | ||
avsextrem | ||
b-l072z-lrwan1 | ||
b-l475e-iot01a | ||
b-u585i-iot02a | ||
bastwan | ||
blackpill-stm32f103c8 | ||
blackpill-stm32f103cb | ||
bluepill-stm32f030c8 | ||
bluepill-stm32f103c8 | ||
bluepill-stm32f103cb | ||
calliope-mini | ||
cc1312-launchpad | ||
cc1350-launchpad | ||
cc1352-launchpad | ||
cc1352p-launchpad | ||
cc2538dk | ||
cc2650-launchpad | ||
cc2650stk | ||
common | ||
derfmega128 | ||
derfmega256 | ||
dwm1001 | ||
e104-bt5010a-tb | ||
e104-bt5011a-tb | ||
e180-zg120b-tb | ||
ek-lm4f120xl | ||
esp32-ethernet-kit-v1_0 | ||
esp32-ethernet-kit-v1_1 | ||
esp32-ethernet-kit-v1_2 | ||
esp32-heltec-lora32-v2 | ||
esp32-mh-et-live-minikit | ||
esp32-olimex-evb | ||
esp32-ttgo-t-beam | ||
esp32-wemos-lolin-d32-pro | ||
esp32-wroom-32 | ||
esp32-wrover-kit | ||
esp32c3-devkit | ||
esp32s2-devkit | ||
esp32s2-lilygo-ttgo-t8 | ||
esp32s2-wemos-mini | ||
esp32s3-devkit | ||
esp32s3-pros3 | ||
esp8266-esp-12x | ||
esp8266-olimex-mod | ||
esp8266-sparkfun-thing | ||
f4vi1 | ||
feather-m0 | ||
feather-m0-lora | ||
feather-m0-wifi | ||
feather-nrf52840 | ||
firefly | ||
frdm-k22f | ||
frdm-k64f | ||
frdm-kl43z | ||
frdm-kw41z | ||
hamilton | ||
hifive1 | ||
hifive1b | ||
hip-badge | ||
i-nucleo-lrwan1 | ||
ikea-tradfri | ||
im880b | ||
iotlab-a8-m3 | ||
iotlab-m3 | ||
limifrog-v1 | ||
lobaro-lorabox | ||
lora-e5-dev | ||
lsn50 | ||
maple-mini | ||
mbed_lpc1768 | ||
mcb2388 | ||
mega-xplained | ||
microbit | ||
microbit-v2 | ||
microduino-corerf | ||
msb-430 | ||
msb-430h | ||
msba2 | ||
msbiot | ||
mulle | ||
native | ||
nrf51dk | ||
nrf51dongle | ||
nrf52dk | ||
nrf6310 | ||
nrf9160dk | ||
nrf52832-mdk | ||
nrf52840-mdk | ||
nrf52840-mdk-dongle | ||
nrf52840dk | ||
nrf52840dongle | ||
nucleo-f030r8 | ||
nucleo-f031k6 | ||
nucleo-f042k6 | ||
nucleo-f070rb | ||
nucleo-f072rb | ||
nucleo-f091rc | ||
nucleo-f103rb | ||
nucleo-f207zg | ||
nucleo-f302r8 | ||
nucleo-f303k8 | ||
nucleo-f303re | ||
nucleo-f303ze | ||
nucleo-f334r8 | ||
nucleo-f401re | ||
nucleo-f410rb | ||
nucleo-f411re | ||
nucleo-f412zg | ||
nucleo-f413zh | ||
nucleo-f429zi | ||
nucleo-f439zi | ||
nucleo-f446re | ||
nucleo-f446ze | ||
nucleo-f722ze | ||
nucleo-f746zg | ||
nucleo-f767zi | ||
nucleo-g070rb | ||
nucleo-g071rb | ||
nucleo-g431rb | ||
nucleo-g474re | ||
nucleo-l4r5zi | ||
nucleo-l011k4 | ||
nucleo-l031k6 | ||
nucleo-l053r8 | ||
nucleo-l073rz | ||
nucleo-l152re | ||
nucleo-l412kb | ||
nucleo-l432kc | ||
nucleo-l433rc | ||
nucleo-l452re | ||
nucleo-l476rg | ||
nucleo-l496zg | ||
nucleo-l552ze-q | ||
nucleo-wl55jc | ||
nz32-sc151 | ||
olimexino-stm32 | ||
omote | ||
opencm904 | ||
openlabs-kw41z-mini | ||
openlabs-kw41z-mini-256kib | ||
openmote-b | ||
openmote-cc2538 | ||
p-l496g-cell02 | ||
p-nucleo-wb55 | ||
particle-argon | ||
particle-boron | ||
particle-xenon | ||
pba-d-01-kw2x | ||
phynode-kw41z | ||
pinetime | ||
pyboard | ||
qn9080dk | ||
reel | ||
remote-pa | ||
remote-reva | ||
remote-revb | ||
rpi-pico | ||
rpi-pico-w | ||
ruuvitag | ||
samd10-xmini | ||
samd20-xpro | ||
samd21-xpro | ||
same54-xpro | ||
saml10-xpro | ||
saml11-xpro | ||
saml21-xpro | ||
samr21-xpro | ||
samr30-xpro | ||
samr34-xpro | ||
seeedstudio-gd32 | ||
seeeduino_arch-pro | ||
seeeduino_xiao | ||
sensebox_samd21 | ||
serpente | ||
sipeed-longan-nano | ||
slstk3400a | ||
slstk3401a | ||
slstk3402a | ||
sltb001a | ||
sltb009a | ||
slwstk6000b-slwrb4150a | ||
slwstk6000b-slwrb4162a | ||
slwstk6220a | ||
sodaq-autonomo | ||
sodaq-explorer | ||
sodaq-one | ||
sodaq-sara-aff | ||
sodaq-sara-sff | ||
spark-core | ||
stk3200 | ||
stk3600 | ||
stk3700 | ||
stm32f0discovery | ||
stm32f3discovery | ||
stm32f4discovery | ||
stm32f030f4-demo | ||
stm32f429i-disc1 | ||
stm32f429i-disco | ||
stm32f469i-disco | ||
stm32f723e-disco | ||
stm32f746g-disco | ||
stm32f769i-disco | ||
stm32f7508-dk | ||
stm32g0316-disco | ||
stm32l476g-disco | ||
stm32l0538-disco | ||
stm32mp157c-dk2 | ||
teensy31 | ||
telosb | ||
thingy52 | ||
ublox-c030-u201 | ||
udoo | ||
usb-kw41z | ||
waspmote-pro | ||
waveshare-nrf52840-eval-kit | ||
weact-f401cc | ||
weact-f401ce | ||
weact-f411ce | ||
wemos-zero | ||
xg23-pk6068a | ||
yarm | ||
yunjia-nrf51822 | ||
z1 | ||
zigduino | ||
doc.txt | ||
Kconfig | ||
README.md |
Platform configurations for RIOT-OS
This directory contains existing configuration and initialization files for platforms supported by RIOT-OS.