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

SPI problem

Hi Nordic team,

I'm trying to run demo SPI programs from NRF5 SDK. I want to create simple SPI communication between two dongles, of which one would be master and the other one - slave. Both projects (SPIS and SPI) compiled and I can flash them on the dongles. The problem is that there is no communication between devices. When I started to check master SPI pins, I saw that MISO, MOSi, CS and SCK pins are the same voltage levels ~65mV and constantly gives away sawtooth form signal. From projects I excluded all logging module elements (NRF_LOG), also excluded app_timer2.c files. Also I set pins which are further away from the antenna and which are unused. I tried to change SPI bus frequency, but the problem remained the same. I could provide more information tomorrow. 

Thanks for any thoughts.

Parents
  • Hi Karl, thanks for the reply.

    I think I solved the problem. On the master side I tried to port nrfx_spim project from the NRF5 SDK, and on the slave side i left the same ported code as before (SPIS project from the SDK). Also I made pin assignments according to the NRF52840 documentation. i think i was wrong when I set them up. And SPI communication started to work. Do not know why, but this is the only one solution which is working for me. Before this, I tried to port SPI example project code from the SDK, but it doesn't work with SPIS project. However, it works now and I think I will have the opportunity to adapt it.

    I don't have access to a NRF52840 DK, I have to make Dongle functional, considering that it is not expensive and practical to use.

Reply
  • Hi Karl, thanks for the reply.

    I think I solved the problem. On the master side I tried to port nrfx_spim project from the NRF5 SDK, and on the slave side i left the same ported code as before (SPIS project from the SDK). Also I made pin assignments according to the NRF52840 documentation. i think i was wrong when I set them up. And SPI communication started to work. Do not know why, but this is the only one solution which is working for me. Before this, I tried to port SPI example project code from the SDK, but it doesn't work with SPIS project. However, it works now and I think I will have the opportunity to adapt it.

    I don't have access to a NRF52840 DK, I have to make Dongle functional, considering that it is not expensive and practical to use.

Children
  • Hello,

    Pinout_1 said:
    thanks for the reply.

    No problem at all, I am happy to help!

    Pinout_1 said:
    I think I solved the problem.

    I am happy to hear that you were able to resolve your issue.

    Pinout_1 said:
    Also I made pin assignments according to the NRF52840 documentation. i think i was wrong when I set them up. And SPI communication started to work.

    Great. Conferring with the Pin Assignment is very important when working with the SoC's to ensure that the peripherals will work as intended.

    Pinout_1 said:
    I don't have access to a NRF52840 DK, I have to make Dongle functional, considering that it is not expensive and practical to use.

    Yes, the dongle is both cheap and practical - a great companion when developing BLE applications, but the DK's makes it tremendously easier to develop with peripherals and other connections to the boards. I personally highly recommend checking out a DK, if you are going to develop a custom board.

    Best regards,
    Karl 

     

Related