nrf-rs / nrf-hal

A Rust HAL for the nRF family of devices
Apache License 2.0
507 stars 140 forks source link

EASY_DMA_SIZE is incorrect #314

Closed Dirbaio closed 3 years ago

Dirbaio commented 3 years ago

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.