Post Go back to editing

SPI

Thread Summary

The user encountered an issue where the slave SPI device (21835-SOM) did not send data to the master SPI device. The solution involved updating the API calls to use the correct descriptor lists for the slave transmitter and master receiver. The support engineer provided an example code demonstrating the correct configuration for SPI1 as the slave and SPI0 as the master.
AI Generated Content
Category: Software
Product Number: ADSP-21835
Software Version: CCES3.0.2

Hi,

I am using 21835-SOM.I want the slave SPI to send and the master SPI to receive.I made modifications based on the code you provided.

The test results show that the slave device did not send anything out.The code is attached. Please help me check it.

Regards,

BingoSPIDMAMode.rar

  • Hi,
    In your example code, you have enabled the MISO pin correctly. However, you need to update the following API calls to use the appropriate descriptor lists:
    eResult = adi_spi_DMAWrite(hSPISlave, Src_List, DMA_NUM_DESC, ePDMAMode);
    eResult = adi_spi_DMARead(hSPIMaster, Dest_List, DMA_NUM_DESC, ePDMAMode);
    Please find the attached example code that demonstrates SPI1 operating as a slave transmitter and SPI0 operating as a master receiver. This configuration works as expected. Please refer to the image below for reference.
    Regards,
    Nandini C

Before You Switch


Switching languages will make ADI Explorer unavailable. Resume your session by switching back to English and reopening ADI Explorer.