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

nrf52840 as SPI slave not receiving data

Hi.

I am trying to use nrf52840 on a custom board and configure it as spi slave, and an STM32H7 controller would be the master. I am using the spis example for nrf. I have cross verified all pin configurations and set it correctly, and set same clock polarity and phase on both controllers, also the controllers are at common ground.

I am able to receive spi data for the same configuration using nrf52840-dk and an STM nucleo board, but not able to receive any data on the custom board.

When debugged on the custom board, the code is always stuck in !spis_xfer_done loop. For the sake of testing, I have commented the LOG sections. 

Also, using an oscilloscope on the custom board, I can see the STM32 controller is transmitting the test data. 

The waveform is captured at the STM transmission end on the custom board.

Have I missed something? Any guidance would be helpful.

Thanks,

Ajay

Parents Reply
  • Hi Simon,

    The CS was the issue at the STM end, as it wasn't configured properly. However, the same case was in the dk but I was receiving correct values then. So I just assumed configurations are fine and checked for the data transmission. Now I have configured the STM controller properly, and able to receive data on the custom board.

    Thanks for the support.

Children
No Data
Related