[riot-notifications] [RIOT-OS/RIOT] boards/nucleo-l476rg: Add DMA support (#11730)

Leandro Lanzieri notifications at github.com
Fri Jun 21 10:18:08 CEST 2019


### Contribution description
This PR:
- Adds DMA stream configurations
- Fixes DMA configurations for UARTs
- Adds DMA configurations for SPI

### Testing procedure
1- To test DMA on UART0, you can run the DMA periph test:
```
BOARD=nucleo-l476rg make all flash test -C tests/periph_dma/
```
<details>
<summary>Expected result</summary>

```
Welcome to pyterm!
Type '/exit' to exit.
2019-06-21 09:48:18,589 - INFO # main(): This is RIOT! (Version: 2019.07-devel-754-ge92516-pr/boards/nucleo-l476rg_dma_config)
2019-06-21 09:48:18,590 - INFO # DMA is working
```
</details>


2- To test the rest of the UARTs while using DMA, you can run the UART test activating the DMA and checking that it sends:
```
BOARD=nucleo-l476rg USEMODULE=periph_dma make all flash term -C tests/periph_uart
```
<details>
<summary>Expected result</summary>

```
Welcome to pyterm!
Type '/exit' to exit.
2019-06-21 10:05:37,965 - INFO # UARD_DEV(0): test uart_poweron() and uart_poweroff()  ->  [OK]
2019-06-21 10:05:37,965 - INFO # 
2019-06-21 10:05:37,966 - INFO # UART INFO:
2019-06-21 10:05:37,967 - INFO # Available devices:               3
2019-06-21 10:05:37,968 - INFO # UART used for STDIO (the shell): UART_DEV(0)
2019-06-21 10:05:37,968 - INFO # 
> init 1 9600
2019-06-21 10:05:41,720 - INFO #  init 1 9600
2019-06-21 10:05:41,725 - INFO # Success: Initialized UART_DEV(1) at BAUD 9600
2019-06-21 10:05:41,979 - INFO # UARD_DEV(1): test uart_poweron() and uart_poweroff()  ->  [OK]
> send 1 riot
2019-06-21 10:05:44,964 - INFO #  send 1 riot
2019-06-21 10:05:44,965 - INFO # UART_DEV(1) TX: riot
>
```
</details>

3- To test the SPI while using DMA, run the SPI periph test activating DMA:
```
BOARD=nucleo-l476rg USEMODULE=periph_dma make all flash term -C tests/periph_spi/
```

<details>
<summary>Expected result</summary>

```
Welcome to pyterm!
Type '/exit' to exit.
init 0 0 0 0 4
2019-06-21 10:13:31,000 - INFO # init 0 0 0 0 4
2019-06-21 10:13:31,006 - INFO # SPI_DEV(0) initialized: mode: 0, clk: 0, cs_port: 0, cs_pin: 4
> send WITH_DMA
2019-06-21 10:13:33,780 - INFO #  send WITH_DMA
2019-06-21 10:13:33,781 - INFO # Sent bytes
2019-06-21 10:13:33,785 - INFO #    0    1    2    3    4    5    6    7 
2019-06-21 10:13:33,789 - INFO #   0x57 0x49 0x54 0x48 0x5f 0x44 0x4d 0x41
2019-06-21 10:13:33,792 - INFO #     W    I    T    H    _    D    M    A 
2019-06-21 10:13:33,793 - INFO # 
2019-06-21 10:13:33,794 - INFO # Received bytes
2019-06-21 10:13:33,798 - INFO #    0    1    2    3    4    5    6    7 
2019-06-21 10:13:33,801 - INFO #   0x57 0x49 0x54 0x48 0x5f 0x44 0x4d 0x41
2019-06-21 10:13:33,805 - INFO #     W    I    T    H    _    D    M    A 
2019-06-21 10:13:33,805 - INFO # 
```
</details>

### Issues/PRs references
None
You can view, comment on, or merge this pull request online at:

  https://github.com/RIOT-OS/RIOT/pull/11730

-- Commit Summary --

  * boards/nucleo-l476rg: Add DMA support

-- File Changes --

    M boards/nucleo-l476rg/Makefile.features (1)
    M boards/nucleo-l476rg/include/periph_conf.h (48)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/11730.patch
https://github.com/RIOT-OS/RIOT/pull/11730.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11730
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190621/3d00f4c0/attachment.html>


More information about the notifications mailing list