This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

how use nRF5 SDK14.2.0 SPI driver functions?

Hi DevZone,

I am working on a CAN Bus library for communication between nRF52840 Preview DK and MCP2515 chipset. I am trying to modify base on an Arduino MCP2515 CAN Bus library but find many difficulties as I am a very junior Nordic board developer.  

Can I ask some specific API functions provided by nRF5 SDK14.2.0 SPI driver?

1. How to read and write the registers such as SPDR, SPSR and how to access the bit such as SPIF.

2. How to set and reset the PIN: MOSI, MISO, SCK and CS?

Best regards

Ree

Parents Reply
  • Thanks, 

    I find function nrf_drv_spi_transfer is used to transfer data from nRF to SPI peripheral device. Could you please tell me 

    1) which function is used to read the data send from SPI peripheral device?

    2) Is it possible to read and write the registers such as SPDR, SPSR and how to access the bit such as SPIF?

    Sorry about these specific questions. The SPI peripheral I am using is a Arudino shield which uses a 3rd party library and AVR library, in that library, it uses SPDR, SPSR register and set register's bit.  

Children
No Data
Related