Post Go back to editing

I want to use ADSP-21489 spi driver to read register from ADXL345 via Visual DSP++. Could you provide the example code by SPI DMA. I don't want to use the way from core buffer to transfer.

Category: Software

I want to use ADSP-21489 spi driver to read register from ADXL345 via Visual DSP++.
Could you provide the example code by SPI DMA. I don't want to use the way from core buffer to transfer.

Thanks

Parents
  • Hi,

    ADSP-21489 doesn't support Device Driver. For SHARC processors, Device Driver support starts from Griffin Family.
    Hence we request to use register based spi code. Please refer the below link which may help you.
    ez.analog.com/.../faq-adsp-21489-spi-example-code

    Regards,
    Divya.P

  • Thanks for your reply.

    This example code is use SPI for transmit  and SPIB for receive.

    I want to set the  21489  to  read register from the ADXL345 accelerometer via SPI DMA.

    I want to achieve this requirement---------->

    How can i use only one SPI to first  transmit  ADXL345  data register address form TX  and then read the  ADXL345 data value form RX by SPI dma ?

    My SRU code set below:

    SRU(SPI_MOSI_O, DPI_PB01_I); //TX
    SRU(DPI_PB02_O, SPI_MISO_I); //RX
    SRU(SPI_CLK_O, DPI_PB03_I);
    SRU(SPI_FLG0_O, DPI_PB04_I);


    SRU(SPI_MOSI_PBEN_O, DPI_PBEN01_I);
    SRU(SPI_MISO_PBEN_O, DPI_PBEN02_I);
    SRU(SPI_CLK_PBEN_O, DPI_PBEN03_I);
    SRU(SPI_FLG0_PBEN_O, DPI_PBEN04_I);

  • Hi ,

    You need Single SPI need to transmit via MOSI and receive via MISO, Like Full duplex communication. Please confirm our understanding.

    Regards,
    Divya.P

Reply Children