Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EASY_DMA_SIZE is incorrect #314

Closed
Dirbaio opened this issue May 10, 2021 · 0 comments · Fixed by #315
Closed

EASY_DMA_SIZE is incorrect #314

Dirbaio opened this issue May 10, 2021 · 0 comments · Fixed by #315

Comments

@Dirbaio
Copy link
Member

Dirbaio commented May 10, 2021

Currently nrf-hal uses EASY_DMA_SIZE=0xFFFF for nrf52840, nrf52833, nrf9160, and EASY_DMA_SIZE=0xFF for others.

However it turns out it's different for each peripheral. The sizes seem to be well organized in the C headers: https://github.com/NordicSemiconductor/nrfx/blob/master/mdk/nrf9160_peripherals.h

Worst one is nrf9160, which is using 0xFFFF but the actual max is 12 bits, so 0xFFF.

Dirbaio added a commit to Dirbaio/nrf-hal that referenced this issue May 10, 2021
EASY_DMA_SIZE changes based on peripheral, but it is always equal for UARTE, SPIx, TWIx, so
I've kept a single variable.

Data source is nrfx files, like [this one](https://github.com/NordicSemiconductor/nrfx/blob/b5399066bd7f3dc32ee15510d06ef7137bcacf36/mdk/nrf9160_peripherals.h#L150).

Fixes nrf-rs#314
Dirbaio added a commit to Dirbaio/nrf-hal that referenced this issue May 10, 2021
EASY_DMA_SIZE changes based on peripheral, but it is always equal for UARTE, SPIx, TWIx, so
I've kept a single variable.

Data source is nrfx files, like [this one](https://github.com/NordicSemiconductor/nrfx/blob/b5399066bd7f3dc32ee15510d06ef7137bcacf36/mdk/nrf9160_peripherals.h#L150).

Fixes nrf-rs#314
bors bot added a commit that referenced this issue May 11, 2021
315: Fix EasyDMA max size. r=jonas-schievink a=Dirbaio

EASY_DMA_SIZE changes based on peripheral, but it is always equal for UARTE, SPIx, TWIx, so
I've kept a single variable.

Data source is nrfx files, like [this one](https://github.com/NordicSemiconductor/nrfx/blob/b5399066bd7f3dc32ee15510d06ef7137bcacf36/mdk/nrf9160_peripherals.h#L150).

I've added the values for all nrf chips, even currently unsupported ones, because they'll likely be supported soon. Can remove it if that's not wanted.

Fixes #314

Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
@bors bors bot closed this as completed in 35282f8 May 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant