nrf: Disable SPIM3; add SPIM1; remove TWIM1 #1638
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SPIM3 has a hardware bug in rev1 nRF52840 (see errata). There's a workaround in nrfx, but it causes BLE to fail.
Reconfigured busio choices to use SPIM1 and SPIM2, disabling SPIM3. TWIM0 and TWIM1 are shared peripherals with SPIM0 and SPIM1, and it's not possible to shared dynamically right now due to static nrfx interrupt handler allocation. So choose to have one I2C bus available, and two SPI buses.
Later we may allow dynamic reconfig, try to fix the SPIM3 anomaly-fix bug (or at least report it with a small test case), and/or have some kind of compilation flags to allow choosing bus allocation, but this is good enough for 4.0.0.
Another bug was the use of
#ifdef NRF_SPIM3
innrfx_config.h
. This macro is not consistently set due to include file order, so avoid using it. That was causing conflicting definitions of macros in different files.Fixes #1628.