1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

43 Commits

Author SHA1 Message Date
Mikolai Gütschow
bb97445b20
boards/*: include periph/gpio.h in board.h 2024-07-12 15:02:43 +02:00
MrKevinWeiss
e0fdc3c16c
*Kconfig*: Modify Kconfig to remove dep model 2024-03-27 10:28:12 +01:00
Marian Buschsieweke
9fbb23b167
boards/common/gd32v: make common OpenOCD config opt-in
Let boards explicitly use the common OpenOCD config if it works for
them, rather than having boards with specific needs opt out.
2024-01-19 23:17:35 +01:00
Gunar Schorcht
26030e28af boards: remove extern mtd_dev_t* Declarations 2023-12-07 15:32:49 +01:00
Gunar Schorcht
9a72d6cc55 boards: fix inches unit in documentation 2023-09-27 09:12:06 +02:00
bors[bot]
1691dbe0d3
Merge #19914 #19915
19914: boards: complete SD Card MTD definition for several bords r=benpicco a=gschorcht

### Contribution description

This PR completes the MTD definition for the following boards:
- `seeedstudio-gd32`
- `sipeed-longan-nano` including `sipeed-longan-nano-tft`
- `waveshare-nrf52840-eval-kit`
- ESP32x boards that have an SPI SD Card interface and use `mtd_sdcard_default`

### Testing procedure

Green CI

### Issues/PRs references#19465 

Prerequisite for PR #19465 

19915: drivers/lcd: support MCU 8080 8-bit parallel mode r=benpicco a=gschorcht

### Contribution description

LCD driver ICs usually support
- SPI serial mode,
- MCU 8080 8-bit parallel mode and
- MCU 8080 16-bit parallel mode.

This PR extends the LCD display driver API to support the MCU 8080 8-/16-bit parallel modes and implements a GPIO-driven MCU 8080 8-bit parallel mode.

The following features are already working locally and will be provided as follow-on PRs for which this PR is a prerequisite.

- GPIO-driven bit-banging implementation of the 16-bit mode of the MCU 8080 parallel interface
- Enabling the display on `stm32f723e-disco` and `stm32l496g-disco` using the feature above
- Definition of a low-level API for the parallel modes using the LCD controller of the MCU
- Using FMC for the display on `stm32f723e-disco` and `stm32l496g-disco`
- Using LCD controller for the display of `esp32-wt32-sc01-plus` (PR #19917)

### Testing procedure

The PR can be tested with PR #19917 on top of this PR.
```
BOARD=esp32s3-wt32-sc01-plus make -j8 -C tests/drivers/st77xx flash
```
The following video shows the test.

**Please note** The test is pretty slow because the display has 480 x 320 pixels and the MCU 8080 8-bit parallel interface is realized by a GPIO-driven bit-banging implementation where each GPIO of the data bus is set separately. A follow-up PR will use the ESP32-S3 LCD controller and DMA for this board. This PR just defines the extension of the driver by the parallel interface and provides the bit-banging implementation for MCUs that don't have a LCD controller on chip.

https://github.com/RIOT-OS/RIOT/assets/31932013/c1e3e3d7-05d9-4ca5-8fff-9a5eaca50fba

### Issues/PRs references

Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-09-20 15:55:34 +00:00
Gunar Schorcht
bf981c81ba boards: complete SD Card MTD definition 2023-09-20 14:15:42 +02:00
bors[bot]
ec69cfde6f
Merge #19919 #19931 #19935
19919: drivers/st77xx: introduce rotation defines r=benpicco a=gschorcht

### Contribution description

The PR introduces counterclockwise rotations for the definition of parameter `ST77XX_PARAM_ROTATION`.

It is more intuitive and universal to use `ST77XX_ROTATION_{0,90,180,270}` instead of `ST77XX_ROTATION_{ST77XX_ROTATION_{VERT,VERT_FLIP,HORZ,HORZ_FLIP}`, especially because the orientation of the display may vary with respect to the orientation of the board.

### Testing procedure

`tests/drivers/st77xx` should still work, for example:
```
BOARD=adafruit-pybadge make -C tests/drivers/st77xx flash
```
```
BOARD=esp32s3-usb-otg make -j8 -C tests/drivers/st77xx flash
```

### Issues/PRs references


19931: boards: fix documentation for GD32V boards and doxygen 1.9.4 r=benpicco a=gschorcht

### Contribution description

This PR fixes some small problems in documentation of `sipeed-longan-nano`, `sipeed-longan-nano-tft` and `seeedstudio-gd32` for doxygen 1.9.4 that is used on `doc.riot-os.org`.

Doxygen version 1.9.4 doesn't like anymore
- single double quotes as symbol for the inches unit in the text
- line breaks in `[]()` to avoid exhausting the 100 characters per line.

See https://doc.riot-os.org/group__boards__sipeed__longan__nano.html for example.

Doxygen 1.9.1 which is part of `riot-docker` container didn't have theses problems 😟

### Testing procedure

Documentation should be fixed.

### Issues/PRs references


19935: boards/nucleo64: fix SPI Arduino mapping for most boards r=benpicco a=maribu

### Contribution description

Before, the Arduino SPI mapping for all Nucleo-64 boards was incorrect. With this, the situation improves to the following:

- [x] nucleo-f030r8
- [ ] nucleo-f070rb
    - No SPI buses provided.
- [x] nucleo-f072rb
- [x] nucleo-f091rc
- [x] nucleo-f103rb
- [ ] nucleo-f302r8
    - No SPI bus at D11, D12, D13 provided
- [x] nucleo-f303re
- [x] nucleo-f334r8
- [x] nucleo-f401re
- [x] nucleo-f410rb
- [x] nucleo-f411re
- [x] nucleo-f446re
- [x] nucleo-g070rb
- [x] nucleo-g071rb
- [x] nucleo-g431rb
- [x] nucleo-g474re
- [x] nucleo-l053r8
- [x] nucleo-l073rz
- [x] nucleo-l152re
    - No SPI bus at D11, D12, D13 provided
- [x] nucleo-l452re
- [x] nucleo-l476rg
- [x] nucleo-wl55jc

The remaining offenders still need to be fixed, but that is better done one PR at a time.

### Testing procedure

- Check if the SPI device provided in the given `boards/<BOARD_NAME>/incude/periph_conf.h` is indeed `SPI_DEV(0)`, or in `periph_conf.h` the correct SPI dev is found
    - this should be fine for all boards above, except for the unchecked ones

or:

- run https://github.com/RIOT-OS/RIOT/pull/19932: The SPI test should pass now

### Issues/PRs references

Bug found in https://github.com/RIOT-OS/RIOT/pull/19932#issuecomment-1726305437

Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Co-authored-by: Marian Buschsieweke <marian.buschsieweke@posteo.net>
2023-09-20 11:42:38 +00:00
Gunar Schorcht
ac52818a81 boards/sipeed-longan-nano: fix doc for doxygen 1.9.4 2023-09-18 18:25:36 +02:00
Gunar Schorcht
af9e1207d0 boards/sipeed-longan-nano: use ST77xx rotation in degree 2023-09-08 12:01:41 +02:00
Gunar Schorcht
cb1c972dc2 boards/sipeed-longan-nano: update for st77xx driver 2023-09-06 11:52:11 +02:00
Gunar Schorcht
41daa18e5d boards/sipeed-longan-nano: cleanup peripheral config
After cleaning up the default config of SPI, this commit cleans up the configuration for `sipeed-longan-nano` a bit:
- PA4 is no longer used as default CS for `SPI_DEV(1)`
- At least one DAC channel PA4 is always available if DAC is used.
- PA4 is always available as ADC channel if DAC is not used.
- The order of ADC and DAC channels has been changed accordingly.
2023-08-07 12:48:15 +02:00
Gunar Schorcht
367d94a80b boards/sipeed-longan-nano: update due to I2C/SPI default config cleanup 2023-08-07 12:48:15 +02:00
Gunar Schorcht
d24a4eedee boards/sipeed-longan-nano: remove TFT display handling 2023-08-06 12:56:36 +02:00
Gunar Schorcht
ce653b74cd boards/sipeed-longan-nano: default to TFT version if st7735 is used 2023-07-12 15:56:20 +02:00
Gunar Schorcht
3f389d0b15 boards/sipeed-longan-nano: fix Kconfig for disp_dev driver 2023-07-12 15:53:36 +02:00
Marian Buschsieweke
2fe9d9f755 Revert "boards/sipeed-longan-nano: default to variant with TFT"
This reverts commit 69fb00bdfa.
2023-07-10 14:56:01 +02:00
Marian Buschsieweke
69fb00bdfa
boards/sipeed-longan-nano: default to variant with TFT
Without KConfig presence of the TFT is assumed in anycase, with KConfig
it is optional. This turns the opt-in into an opt-out to match behavior
with make by default, fixing the nightly breakage.
2023-07-09 11:36:12 +02:00
Gunar Schorcht
199376651f boards/sipeed-longan-nano: fix TFT display config and documentation 2023-07-04 12:12:50 +02:00
Gunar Schorcht
7687c49120 boards/sipeed-longan-nano: documentation fix 2023-07-03 11:49:15 +02:00
MrKevinWeiss
92794c0eca
boards/*: Model usb and stdio in Kconfig 2023-05-31 13:04:42 +02:00
Gunar Schorcht
dc29a3e209 boards: enable riotboot feature for GD32V boards in Kconfig 2023-04-18 06:20:46 +02:00
Gunar Schorcht
c92b981581 boards/spieed-longan-nano: use stdio_cdc_acm by default 2023-04-16 23:24:23 +02:00
Gunar Schorcht
ac8f221c1f boards/sipeed-longan-nano: add periph_usbdev support 2023-04-16 23:24:23 +02:00
Gunar Schorcht
f7b039f589 boards/sipeed-longan-nano: add BOOT as user button 2023-03-24 08:12:03 +01:00
bors[bot]
37b64912d4
Merge #19256
19256: pkg/tinyusb: add GD32VF103 support r=gschorcht a=gschorcht

### Contribution description

This PR provides the tinyUSB support for GD32VF103 and enables the `tinyusb_device` feature as well as `stdio_tinyusb_cdc_acm` for GD32VF103 boards.

### Testing procedure

```
BOARD=sipeeed-longan-nano make -C tests/shell flash term
```
should work

### Issues/PRs references


Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-02-21 16:53:06 +00:00
Gunar Schorcht
fae506697f boards/sipeed-longan-nano: enable stdio_tinyusb_cdc_acm as default 2023-02-21 15:04:13 +01:00
Gunar Schorcht
4540f96332 boards/sipeed-longan-nano: add tinyUSB support 2023-02-21 15:04:13 +01:00
Gunar Schorcht
eb9b636fbc boards/sipeed-longan-nano: add periph_dac support 2023-02-07 02:42:19 +01:00
Gunar Schorcht
7f0d560dd8 boards/sipeed-longan-nano: improve peripherals doc
Available peripherals for the board are now shown ordered by RIOT peripheral names and by pins.
2023-02-06 07:57:13 +01:00
Gunar Schorcht
025f4fdf00 boards/sipeed-longan-nano: improve Kconfig
Board-specific configuration not shown any longer directly in the top level menu but within a submenu.
2023-02-06 07:57:13 +01:00
Gunar Schorcht
c9c587ee00 boards/sipeed-longan-nano: improve ADC config
The ADC configuration was too complex. It was hard to follow when certain ADC lines are available. Furthermore, the order of ADC lines did depend on the use of other peripherals. Now, either the TFT display is not connected and all ADC lines are available or the TFT display is connected and the second SPI device is used so that only the first 4 ADC lines are available.
2023-02-06 07:57:13 +01:00
Benjamin Valentin
f78cdbb095 boards/sipeed-longan-nano: make use of mtd_sdcard_default 2023-02-05 19:05:44 +01:00
Gunar Schorcht
15a3b08aa7 boards/sipeed-longan-nano: add periph_adc support 2023-02-01 23:11:07 +01:00
Gunar Schorcht
8d3369acc7 boards/sipeed-longan-nano: add SPI configuration 2023-02-01 02:44:54 +01:00
Gunar Schorcht
fde5c8a3ea board/sipeed-longan-nano: add periph_i2c support 2023-01-31 20:12:04 +01:00
Gunar Schorcht
8ecc80a3ac boards/seeedstudio-gd32: add periph_pwm support 2023-01-28 18:16:17 +01:00
bors[bot]
c6c84cccc9
Merge #19199 #19205 #19207
19199: sys/suit: Ensure previous thread is stopped before reusing its stack r=benpicco a=chrysn

### Contribution description

Closes: https://github.com/RIOT-OS/RIOT/issues/19195

If the thread has released the mutex but the thread has not terminated (which happens in the situation that would previously have overwritten a still active thread's state), then a warning is shown and the trigger is ignored.

### Testing procedure

This should work before and after:

* `make -C examples/suit_update BOARD=native all term`
* `aiocoap-client coap://'[fe80::3c63:beff:fe85:ca96%tapbr0]'/suit/trigger -m POST --payload 'coap://[2001:db8::]/foo'`
* In parallel, on the RIOT shell, run `suit fetch coap://[2001:db8::]/foo`
* After the first download fails, the second one starts right away ("suit_worker: update failed, hdr invalid" / "suit_worker: started").

Run again with the worker thread on low priority:

```patch
diff --git a/sys/suit/transport/worker.c b/sys/suit/transport/worker.c
index a54022fb28..e26701a64c 100644
--- a/sys/suit/transport/worker.c
+++ b/sys/suit/transport/worker.c
`@@` -70 +70 `@@`
-#define SUIT_COAP_WORKER_PRIO THREAD_PRIORITY_MAIN - 1
+#define SUIT_COAP_WORKER_PRIO THREAD_PRIORITY_MAIN + 1
```

Before, this runs the download once silently (no clue why it doesn't run it twice, but then again, I claim there's concurrent memory access from two thread, so who knows what happens). After, it runs a single download and shows an error message for the second one once the first is complete ("Ignoring SUIT trigger: worker is still busy.").

### Issues/PRs references

This may be made incrementally easier by https://github.com/RIOT-OS/RIOT/pull/19197 -- that PR as it is now would spare us the zombification (because returning would do that), and having a `wait` function would allow us to turn the new error case into a success.

19205: boards/common: add common timer config for GD32VF103 boards r=benpicco a=benpicco



19207: examples/gnrc_border_router: static: use router from advertisements by default r=benpicco a=benpicco




Co-authored-by: chrysn <chrysn@fsfe.org>
Co-authored-by: Benjamin Valentin <benjamin.valentin@bht-berlin.de>
Co-authored-by: Benjamin Valentin <benpicco@beuth-hochschule.de>
2023-01-27 21:01:39 +00:00
Benjamin Valentin
162d06a9bd boards/common: add common timer config for GD32VF103 boards 2023-01-27 21:39:22 +01:00
bors[bot]
31fe47c82c
Merge #19202
19202: cpu/gd32v: add periph_rtt support r=benpicco a=gschorcht

### Contribution description

This PR provides the `periph_rtt` support and is one of a bunch of PRs that complete the peripheral drivers for GD32VF103.

### Testing procedure

`tests/periph_rtt` should work and give the following results:
```
Help: Press s to start test, r to print it is ready
START
main(): This is RIOT! (Version: 2023.04-devel-199-g2d429-cpu/gd32v/periph_rtt)

RIOT RTT low-level driver test
RTT configuration:
RTT_MAX_VALUE: 0xffffffff
RTT_FREQUENCY: 32768

Testing the tick conversion
Trying to convert 1 to seconds and back
Trying to convert 256 to seconds and back
Trying to convert 65536 to seconds and back
Trying to convert 16777216 to seconds and back
Trying to convert 2147483648 to seconds and back
All ok

Initializing the RTT driver
This test will now display 'Hello' every 5 seconds

RTT now: 148
Setting initial alarm to now + 5 s (163988)
rtt_get_alarm() PASSED
Done setting up the RTT, wait for many Hellos
{ "threads": [{ "name": "idle", "stack_size": 256, "stack_used": 216 }]}
{ "threads": [{ "name": "main", "stack_size": 1280, "stack_used": 480 }]}
Hello
Hello
Hello
Hello
```

### Issues/PRs references


Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-01-27 17:19:20 +00:00
Benjamin Valentin
15dfaddeb5 boards/sipeed-longan-nano: default to flashing via DFU 2023-01-27 12:11:00 +01:00
Gunar Schorcht
72b214a9dc boards/sipeed-longan-nano: add periph_rtt support 2023-01-27 06:46:51 +01:00
Gunar Schorcht
13e4ea4be1 boards/sipeed-longan-nano: initial support 2023-01-23 18:59:32 +01:00