Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

dhalbert
Copy link
Collaborator

@dhalbert dhalbert commented Mar 12, 2019

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 in nrfx_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.

@dhalbert dhalbert requested a review from tannewt March 12, 2019 12:38
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the tweak!

@tannewt tannewt merged commit cfb54f0 into adafruit:master Mar 12, 2019
@dhalbert dhalbert deleted the disable-SPIM3 branch May 28, 2019 13:26
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 this pull request may close these issues.

[nrf52840] Crash or hang during NUS and SPI use
2 participants