nRF52833, SPI with DMA data receive Issue

Hi,

I am working with nRF52 DK (52832), and the issue I am facing is that i am unable to increase the data size of data SPI -DMA can receive.

Currently it is configured at 30 bytes.
by configuring below macro more than 30, the code crashes.
macro in nrf52832_peripherals.h

#define SPIS0_EASYDMA_MAXCNT_SIZE 30
#define SPIS1_EASYDMA_MAXCNT_SIZE 30
#define SPIS2_EASYDMA_MAXCNT_SIZE 30



Below is the error which it gives on changing the value to 60 from 30


I have even modified the buffers sizes as per requirement as you can see in below code:
/* SPI as slave with esayDMA */
static const nrf_drv_spis_t spis = NRF_DRV_SPIS_INSTANCE(SPIS_INSTANCE);/**< SPIS instance. */

#define TEST_STRING "Nordic"
static uint8_t       m_tx_buf[60] = TEST_STRING;           /**< TX buffer. */
//static uint8_t       m_rx_buf[sizeof(TEST_STRING) + 1];    /**< RX buffer. */
static uint8_t       m_rx_buf[60];    /**< RX buffer. */
static const uint8_t m_length = sizeof(m_tx_buf);        /**< Transfer length. */


Is there any other changes which needs to be done, initially the value of the above macro was at 8 by default.

As per the data sheet the DMA can be configured to receive 255 bytes.

Looking forward to support on urgent basis.

kind regards,
Akshay Mehrotra

Related