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

Problem using digital IO as MISO.

Hi, I'm trying to set P0.20 pin as MISO of my spi master to communicate with ADXL372 accelerometer sensor, but when the miso is disconnected the signal received matches with expected and when connected to the DK pin the signal is modified and results are different. 

The expected signal received when disconnected from DK: 

The received signal after connected to P0.20 pin:

I used the default configuration of SPI:

nrf_drv_spi_config_t spi_config = NRF_DRV_SPI_DEFAULT_CONFIG;

spi_config.frequency = NRF_DRV_SPI_FREQ_4M;
spi_config.ss_pin = SPI_SS_PIN; //P0.08;
spi_config.miso_pin = 20;
spi_config.mosi_pin = SPI_MOSI_PIN; //P0.16;
spi_config.sck_pin = SPI_SCK_PIN; //P0.16;
spi_config.mode = NRF_DRV_SPI_MODE_0;


uint32_t ret =nrf_drv_spi_init(&spi, &spi_config, NULL , NULL);

I've already tried to change the MISO pull config on sdk_config.h with no success.

NRFX_SPIM_MISO_PULL_CFG 1

I'm using SDK 15.2.0_9412b96 on PCA10040 V1.1.1 2016.35, with softdevice  s132 6.1.0.

Do you know how can I configure this pin to work properly? 

Parents Reply Children
Related