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

SPI CS not toggled during transfer

Hello,

I want to connect one board trough SPI to my nRF51-DK. Using SDK11 and SD130, the nRF51-DK is the SPI master, I call the function nrf_drv_spi_transfer() but the CS Pin is never toggled. To solve this I changed it manually before and after the transfer, but this is not a good solution. I dug into the functions and discovered that this should be done automatically by this part of the code (from what I understood):

    if (p_cb->ss_pin != NRF_DRV_SPI_PIN_NOT_USED)
    {
        nrf_gpio_pin_clear(p_cb->ss_pin);
    }

and after the transfer

    if (p_cb->ss_pin != NRF_DRV_SPI_PIN_NOT_USED)
    {
       nrf_gpio_pin_set(p_cb->ss_pin);
    }

The NRF_DRV_SPI_PIN_NOT_USEDis defined as 0xFF, do I need to change it? Is there any other way to do this?

Thank you for the help,

Jorge Costa

Related