9 Replies Latest reply on Jun 29, 2015 11:29 AM by FeTu_2131621

    SPI does not work in DMA mode



      i am trying to use SPI on the SN8000xUFL platform.

      If I initialize the SPI with "SPI_NO_DMA" bit set, everything works as expected and I can see SPI transfers on the oscilloscope.

      If I set the "SPI_USE_DMA" there are not transfers.

      The code is pretty straightforward, I found it in one of the examples:

         wiced_spi_device_t spi = {
                 .port        = WICED_SPI_1,
                 .chip_select = WICED_GPIO_23,
                 .speed       = 1500000,
                 .mode        = (SPI_CLOCK_RISING_EDGE | SPI_CLOCK_IDLE_LOW | SPI_USE_DMA | SPI_MSB_FIRST),
                 .bits        = 8
           wiced_spi_message_segment_t segments[1];
           uint8_t out[16];
           uint8_t in[16];
           segments[0].tx_buffer = out;
           segments[0].length = 16;
           segments[0].rx_buffer = in;
              // change the resistance on this channel from min to max:
              wiced_spi_transfer(&spi, segments, 1);


      Is there something I have missed or an extra peripheral I forgot to configure?