ext: nrfx: Reserve PPI channels and groups used by Bluetooth controller

Mark the PPI channels and groups used by the Bluetooth controller
as occupied and thus unavailable for allocation through nrfx_ppi.

Add also a build time assertion that checks if these PPI channels
do not overlap with those assigned to the pwm_nrf5_sw driver
(to replace the comments in this driver that were supposed to warn
about this threat but had in fact little chance to be read by users).

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This commit is contained in:
Andrzej Głąbek 2019-04-26 09:58:05 +02:00 committed by Carles Cufí
commit 5e38ed9320
4 changed files with 93 additions and 10 deletions

View file

@ -244,14 +244,6 @@ static int pwm_nrf5_sw_init(struct device *dev)
return 0;
}
/* NOTE: nRF51x BLE controller use HW tIFS hence using only PPI channels 1-6.
* nRF52x BLE controller implements SW tIFS and uses addition 6 PPI channels.
* Also, nRF52x requires one additional PPI channel for decryption rate boost.
* Hence, nRF52x BLE controller uses PPI channels 1-13.
*
* NOTE: If PA/LNA feature is enabled for nRF52x, then additional two PPI
* channels 14-15 are used by BLE controller.
*/
static const struct pwm_config pwm_nrf5_sw_0_config = {
.timer = _CONCAT(NRF_TIMER, DT_NORDIC_NRF_SW_PWM_0_TIMER_INSTANCE),
.ppi_base = DT_NORDIC_NRF_SW_PWM_0_PPI_BASE,