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
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
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
Yeah, you understand is right
Hi
Apologies for the delay in getting back to you.
The SPI has a single DMA engine which can be configured to support either an SPI transmit channel or a receive channel, but not both simultaneously.
Please find the attached code which Transmits in DMA and Receives in core.ADSP_21489_SPI_TxDMA_RxCORE.zip
Regards,
Divya.P
Thanks for your reply.But
if I use ESP32 SPI master to keep on transmiting the 24 bytes (4-ADXL345 ACC data) to 21489.
3.How can i set the ADSP21489 SPIB to poll receiving the data in while(1)
Could you provide the example code Visual DSP++ for me ?
ESP32 clk is 80MHZ,
Thanks for your reply.But
if I use ESP32 SPI master to keep on transmiting the 24 bytes (4-ADXL345 ACC data) to 21489.
3.How can i set the ADSP21489 SPIB to poll receiving the data in while(1)
Could you provide the example code Visual DSP++ for me ?
ESP32 clk is 80MHZ,
Hi
We understand that your query is already handled in below thread. To avoid duplication of effort please continue the discussion there
ez.analog.com/.../1-i-want-to-set-the-processor-21489-spi-slave-2-i-use-esp32-spi-master-to-keep-on-transmiting-the-24-bytes-4-adxl345-acc-data-to-21489-3-how-can-i-set-the-adsp21489-spib-to-poll-receiving-the-data-by-dma-interrupt-could-you-p
Regards,
Divya.P