This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Using SPI master mode (NOT WORKING)

Hi, I'm using a nRF51422+nRF6310 and I need to use SPI in order to connect with some devices. I am trying to run the example "spi_master_example_with_spi_slave" but I found is not working. Apparently is not crashing (is not going to the error handler), the problem is that I cannot see the clock signal ( neither the MISO, MOSI...) in any of the pins. Not only I tried with the appropiate pin but also I tried with all the other pins and I'm not seeing the signal on my oscilloscope. What can be working bad? How can I solve that problem and use my SPI in master mode? I hope you can help me whit the issue, Thanks in advance

  • Which version of the SDK are you using? What is the connected slave device? Did you alter the example in any way?

  • Hi, it's SDK v6. I have nothing connected as slave. I just wanted to test the clock signal before to connect the slave device. I didn't change the test in any way. I just run it from reset and I set a breakpoint just before the call to 'nrf_delay_ms' in the 'spi_send_recv' function. In that function the following code is executed:

    *//Start transfer.
    uint32_t err_code = spi_master_send_recv(SPI_MASTER_HW, p_tx_data, len, p_rx_data, len);
    APP_ERROR_CHECK(err_code);*
    

    I check in the debugging mode that the APP_ERROR_CHECK is succesful, so I dont understand why I cannot see any change in the spi lines. Thank for your interest

  • image descriptionIt is the same in my side. Not correct signal in the bus. Is this example correct and usable?

    Use the default setting, including the pins assignment. It send out 16 bytes from 'A' + 1 to 'A' + 16, but the clock is not correct obviously.

    It is quite strange...

  • Sorry for the delay, I have gotten around to testing it now. I used the spi_master_example_with_spi_slave from sdk 6.0.0, and without changing it, I can see the correct data is being output. How are you measuring the pins? What revision of the chip are you using?

  • could you guide us how you do this?what is the hardware?

Related