Skip to content

nrf52840 - add SPIM3 to support 32Mhz SPI transfers #1298

@jmstriegel

Description

@jmstriegel

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions