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

MCP25625 with nrf52832

Hi I wanted to ask if there is a driver/library for the mcp25625 chip? Also for the communication do I use "SPIM — Serial peripheral interface master withEasyDMA" or "SPI — Serial peripheral interface master".

We made our own pcb to interface a dwm1001 module with an mcp25625 to get some CAN communication to the board. I am trying to get the SPI Master on

NRF52832 MCP25625
P0.14 SPI_CS
P0.22 SPI_MISO
P0.31 SPI_MOSI
P0.30 SPI_SCK

Is that feasible? Thank you for your help.

  • Hi Christoph, 

    I am afraid that we do not have a driver or library for the mcp25625 ? However, it could be that some in the community has made one and is willing to share. 

    As for the pin assignment for SPI on the nRF52832, there are some GPIOs that should only be used for low frequency signals(i.e. up-to 10kHz) due to their proximity to the radio power supply and antenna pins, see GPIO usage restrictions.

    Hence, I would recommend using other pins than P0.31 and P0.30 for MOSI and SCK. 

    Best regards

    Bjørn

  • Hi Bjørn,

    thank you for your answer and the information about the GPIOs, that really helps.

    Just to make sure, there is also no driver for MCP2515? It is basically the same chip without a CAN transceiver.

    Also is there a tutorial or instructions on how to program/change GPIO functions of the nRF52832? I am struggling to find a staring point.

    Thanks,

    Christoph

  • I found this question which contains some code for the MCP2515: https://devzone.nordicsemi.com/f/nordic-q-a/9353/mcp2515-with-nrf51-dk/122706#122706. Note: its for the nRF51, but it should not be a very much work to port it to a nRF52. 

    You simply set which pins you want to use in the nrfx_spim_config_t struct that you pass to nrfx_spim_init, which initializes the SPI Master driver. 

    You should also take a look at the SPI Master Example in our nRF5 SDK v16.0.0.