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

nRf51822 SPI Slave not working properly

Hi All,

I am facing a strange problem. The scenario is that nRF51822 is acting as SPI SLave while MSP430 is acting as SPI Master. Using the SPI slave example as an app I'm configuring nRF as Slave. And running an App on MSP to send a byte on MOSI line. Problem is the data that i get from Master in RX_BUF of slave is not matching with the data what Master is actually sending but the data sent in response to Master from Slave is matching. Master is getting a data (0xCF) that Slave is sending, if there would be any problem in connectin set up the Slave will send either 0xAA/0x55. I dont get this strange problem , Can anyone help me out over here ? Brajesh

Parents
  • Hi

    • What nRF51 hardware/kit are you using and what nRF51 SDK version?
    • Make sure the settings are the same for CPHA and CPOL for the nRF51 and MSP430.
    • Try to add a delay on the MSP430 side after setting CSN line low but before clocking out data.
    • The nRF51 SPI slave needs 7.1 us delay.
    • What happens if you change the SPI clock speed of the SPI master. Does that change anything? The nRF51 SPI slave can only handle 2Mbps speed.
    • If you monitor the MOSI line with a logical analyzer or scope, do you see faulty data there or the correct data?
Reply
  • Hi

    • What nRF51 hardware/kit are you using and what nRF51 SDK version?
    • Make sure the settings are the same for CPHA and CPOL for the nRF51 and MSP430.
    • Try to add a delay on the MSP430 side after setting CSN line low but before clocking out data.
    • The nRF51 SPI slave needs 7.1 us delay.
    • What happens if you change the SPI clock speed of the SPI master. Does that change anything? The nRF51 SPI slave can only handle 2Mbps speed.
    • If you monitor the MOSI line with a logical analyzer or scope, do you see faulty data there or the correct data?
Children
No Data
Related