[riot-notifications] [RIOT-OS/RIOT] cpu/nrf52840: fix UART DMA when data is in ROM (#11170)

Hauke Petersen notifications at github.com
Wed Mar 13 13:06:35 CET 2019


### Contribution description
When testing https://github.com/RIOT-OS/RIOT/pull/11096, we discovered a bug in the `nrf5240`s uart implementation: Nordic's `EasyDMA` is only capable of transferring data from RAM, but not from ROM. So whenever passing a ROM location to the UART driver (e.g. some `const char *`), the UART would only transfer `0x00` bytes. This made e.g. `tests/fmt_print` fail for all targets using the `nrf5280` cpu.

This PR fixes this issue by chunk-wise copying the TX data into RAM before sending it in case the data is coming from ROM.


### Testing procedure
Run e.g. the `tests/fmt_print` test on the `nrf52840dk` or the `reel` or similar. Without this PR the test will fail, with this PR it will succeed.

### Issues/PRs references
issue found in #11096
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * cpu/nrf52840: fix UART DMA when data is in ROM

-- File Changes --

    M cpu/nrf5x_common/periph/uart.c (38)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/11170.patch
https://github.com/RIOT-OS/RIOT/pull/11170.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/11170
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190313/2ed013ba/attachment.html>


More information about the notifications mailing list