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

SPI instance 1 configuration

Hi all,

I am using 2 SPI's in my design. I enabled  SPI0_ENABLED and SPI1_ENABLED in my sdk_config.h. 

SPI0 works fine. But SPI1 MOSI pin always sends 0xFF. 

My pin configuration is like below: 

CS = PO_08

SCK = PO_04

MOSI = PO_06

MISO = PO_07 

Are these pins have any conflicts with any other interface? Please help. 

Regards

Lakshmi

Parents
  • Do you use a DK? Do you use logging over UART in your project? Check if NRF_LOG_ENABLED is 1 and NRF_LOG_BACKEND_UART is 1. If so, your project probably use the P0.06 as the UART pin, so it can't be used for SPI. Of not, can you please let me know what project you started out with?

    Does everything else look like its running correctly? Do you check the return values of your function calls? Do any of them return a non-zero value?

    BR,

    Edvin

  • @Edvin,

    Thanks for helping. after NRF_LOG_ENABLED , it started working. I am using ble_app_hrs project(pca10040) as reference. for my custom design. 

    Here is another thing I observed. nrf_drv_spi_transfer API takes uint8_t as transfer length size. Which is restricting my writes and reads from memory to only 256 bytes.

    Is there any other API where I can send large number of bytes. 

    Regards

    Lakshmikanth

Reply Children
Related