Hello,
I am attempting to setup a SPIS interface, and I am continuously getting 0x00 inside my RX buffer. I am varying the length of TX from the SPI master, and seeing the SPIS RX count increase and decrease accordingly, but my buffer is always NULL. Everything seems to be operating correctly, but my DMA is not retrieving my data properly.
static volatile uint8_t spi_tx_buf[SPI_TX_SIZE];
static volatile uint8_t spi_rx_buf[SPI_RX_SIZE];
spi_slave_config.miso_pin = MISO_PIN;
spi_slave_config.mosi_pin = MOSI_PIN;
spi_slave_config.sck_pin = SCLK_PIN;
spi_slave_config.csn_pin = NSS_PIN;
spi_slave_config.mode = NRF_DRV_SPIS_MODE_0;
spi_slave_config.bit_order = NRF_DRV_SPIS_BIT_ORDER_MSB_FIRST;
spi_slave_config.def = DEF_CHARACTER;
spi_slave_config.orc = ORC_CHARACTER;
err_code = nrf_drv_spis_init(&spis_handle, &spi_slave_config, spi_slave_event_handler);
APP_ERROR_CHECK(err_code);
nrf_drv_spis_buffers_set(&spis_handle, (uint8_t*)spi_tx_buf, SPI_TX_SIZE, (uint8_t*)spi_rx_buf, SPI_RX_SIZE);
I am using the default values for the SPIS pins according to the PCA10040 board. Any help would be greatly appreciated. All events are properly being answered, and the buffers are reloaded after each transaction.