Hello,
The nRF52833 can support max 8MHz on spi0, spi1 and spi2, but for spi3 it can support up to 32MHz, ref:
https://docs.nordicsemi.com/bundle/ps_nrf52833/page/spim.html#d1152e543
Kenneth
Hello Kenneth, thanks for your quick response. I checked out the link you have shared where I found two contradictory things. At one place it was written that it supports maximum frequency up to 32 MHz but in configuration section there was nothing in front of the SPIM3 and for SPIM0 to SPIM2 it was showing 8MHz Max supported no more than that. Please check that.
Thank You.
This table indirectly explains that spi0-2 is limited to 8MHz, even though the register can go up to 32MHz:
Kenneth
Hi Kenneth, I got it but what about SPIM3 there is nothing mentioned about it in the table. I am using the spi library nrf_drv_spi.c/h and nrf_spi.h and nrf_spim.h, in these drivers there is no mention of SPI3(only SPI0 to SPI2) so how can I access SPIM3 ? Is there any other driver for accessing it?
Thank You.
Hello,
I think I understand the confusion now. The nRF52833 can operate in legacy spi mode (deprecate mode where each byte is written from an interrupt handler) or it can operate in spim mode (where the entire transfer is handled through EasyDMA without any MCU interaction).
https://docs.nordicsemi.com/bundle/ps_nrf52833/page/spi.html#d1135e325
https://docs.nordicsemi.com/bundle/ps_nrf52833/page/spim.html#d1152e543
The spim have one more "spi" instance 3, which can also support 32MHz. You might wonder why this is, but actually the hardware implementation for spim3 is very different from the spim0-2 and spi0-2. So even thought they are register and functionally the same seen from software, only spim3 can support 32MHz.
Kenneth
Hello,
I think I understand the confusion now. The nRF52833 can operate in legacy spi mode (deprecate mode where each byte is written from an interrupt handler) or it can operate in spim mode (where the entire transfer is handled through EasyDMA without any MCU interaction).
https://docs.nordicsemi.com/bundle/ps_nrf52833/page/spi.html#d1135e325
https://docs.nordicsemi.com/bundle/ps_nrf52833/page/spim.html#d1152e543
The spim have one more "spi" instance 3, which can also support 32MHz. You might wonder why this is, but actually the hardware implementation for spim3 is very different from the spim0-2 and spi0-2. So even thought they are register and functionally the same seen from software, only spim3 can support 32MHz.
Kenneth
Hi Kenneth, thanks for your response. Is there any driver for accessing spi 3 or a code example for it's implementation or any guide suggesting how to do that because apart from it's name and base address I could not find more information about it.
Thank You.
I can see a devzone case where someone was using spi3, here you can see how to define spi3 in the overlay file, and also how to use it in the project code.
Kenneth