-
Notifications
You must be signed in to change notification settings - Fork 991
Description
The SPIM3 device on nrf52840 supports speeds up to 32Mhz, which would give a much needed 4x speed boost for things like TFT displays.
Getting this working will require converting SPI code from using the old SPI registers to using the SPIM api. I believe SPIM0 and SPIM1 will be common across all the nrf52 variants, but SPIM3 can only be used by the nrf52840. Only SPIM3 supports the 16 and 32Mhz modes. SPIM0 and SPIM1 can operate at up to 8Mbps, similar to the old SPI api.
The fix is a little over what I can immediately manage, but if anyone else is interested in taking a stab, here's some info to get you started.
First, it looks like both arduino and circuitpython libraries support this, but they directly using the nfrx c api from Nordic:
dhalbert/circuitpython@2f1e678
adafruit/Adafruit_nRF52_Arduino#360
These make calls to nrfx_spim_xfer and nrfx_spim_init which are implemented in c here.
From the slack channel
- Nia recommends that these calls should probably be reimplemented in go in the machine file.
- Benjamin Gould comments that there is a known glitch that requires a separate memory buffer for SPIM3, and that this circuitpython workaround may be useful to review.