Forums - CSR1024 as SPI slave

2 posts / 0 new
Last post
CSR1024 as SPI slave
jean-pierre.fortune
Join Date: 14 Sep 16
Posts: 1
Posted: Mon, 2017-05-08 14:50

Hi all,

Is there any example for the use of the CSR102x SPI API in slave configuration?

The embedded doc is very poor about this.

Here is my test code:

[...]

/* SPI slave init */

status = SpiOpen(PIO_SPI_MOSI,

                             PIO_SPI_MISO,

                             PIO_SPI_SCLK,

                             SPI_BUS_MODE_SLAVE);

 

/* Config the CS line */

status = SpiConfigCsel(PIO_SPI_CS,

                                     0,

                                     0,

                                     SPI_CSEL_ACTIVE_LOW,

                                     SPI_CSEL_MODE_XFER);

 

status = SpiConfigData(8, SPI_DATA_ENDIAN_LITTLE, SPI_DATA_IDLE_HIGH, 0);

 

status = SpiRead(spi_rx_buffer, 2, 1, 0);

[...]

This code should trigger a SPI_EVENT_SLAVE_AFTER_N_RX_WORDS event (sys_event_spi in AppProcessSystemEvent) upon reception of SPI data.

The SPI signals (clk, miso, mosi) observed with an oscilloscope seem correct but no event is triggered.

Thanks in advance for your help!

--

Jean-Pierre

  • Up0
  • Down0
abarak Moderator
Join Date: 7 Jun 16
Posts: 13
Posted: Tue, 2017-06-13 06:24

Hi Jean-Pierre,

Although SPI slave functionality is documented in the SDK (I suppose you are using 3.0.3), it is not actually supported yet.

We plan to support it in the next 3.0.X release, and release example code in 3.1.X release.

 

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.