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
  • Thanks Stefan, Iv got it solved by a workaround. I checked the received data by using UART and strangely it 1 but left shifted data of what is actually sent by MSP(SPI Master). I'v checked probably there is some issue with TI's MSP regarding the same. And it worked correctly when i changed SPI Mode of Slave (BLE) from Mode_0 to Mode_1 (while SPI Master is still operating on Mode_0). Ideally both should have same but in may case it worked when i keep two different modes here. Do you have a proper reason for this, why it worked like that ?

    Thanks :)

    Brajesh

Reply
  • Thanks Stefan, Iv got it solved by a workaround. I checked the received data by using UART and strangely it 1 but left shifted data of what is actually sent by MSP(SPI Master). I'v checked probably there is some issue with TI's MSP regarding the same. And it worked correctly when i changed SPI Mode of Slave (BLE) from Mode_0 to Mode_1 (while SPI Master is still operating on Mode_0). Ideally both should have same but in may case it worked when i keep two different modes here. Do you have a proper reason for this, why it worked like that ?

    Thanks :)

    Brajesh

Children
Related