ΣSigmaStudio Ask AI Русский Log in

Has anyone used SPI to interface an Arduino and their DSP like on ADSP-BF706 EZ-KIT Mini

Processors & DSP thorbjorn88 Apr 28, 2016 00:00 5 replies Original on forum ↗
Subscribe
thorbjorn88 Question
Apr 28, 2016 00:00

I'm trying to get my BF706 to work as an SPI slave to an Arduino and cannot find any examples of how to get the BF706 to work as an SPI slave. Below is one configuration I've tried. What am I missing? Am I using the correct function to read the transceiver?

//set up SPI

//*****************************************************************

/* SPI driver handle */

ADI_SPI_HANDLE hDevice;

/* driver API result code */

ADI_SPI_RESULT SPIresult;

/* transceiver buffers */

uint8_t RxBuffer[7] = {0};

uint8_t TxBuffer[7] = {0x0,0x1,0x2,0x3,0x4,0x5,0x6};

/* transceiver configurations */

ADI_SPI_TRANSCEIVER Transceiver1 = {NULL, 0, &TxBuffer[0], 7, &RxBuffer[0], 7};

/* open the SPI driver */

SPIresult = adi_spi_Open(0, SPIDriverMemory, (uint32_t)ADI_SPI_DMA_MEMORY_SIZE, &hDevice);

CheckSpi(SPIresult);

//Configure SPI

SPIresult = adi_spi_SetMaster(hDevice, false); //slave msb first

CheckSpi(SPIresult);

//SPIresult = adi_spi_SetHwSlaveSelect(hDevice, false); //HW slave select

// CheckSpi(SPIresult);

//SPIresult = adi_spi_SetSlaveSelect(hDevice, ADI_SPI_SSEL_ENABLE1);

//CheckSpi(SPIresult);

//match transmitted

SPIresult = adi_spi_SetClockPolarity(hDevice, false);

CheckSpi(SPIresult);

SPIresult = adi_spi_SetClockPhase(hDevice, true);

CheckSpi(SPIresult);

SPIresult = adi_spi_SetWordSize(hDevice, ADI_SPI_TRANSFER_8BIT);

CheckSpi(SPIresult);

SPIresult = adi_spi_RegisterCallback(hDevice, NULL, NULL);

CheckSpi(SPIresult);

/* Diable DMA */

SPIresult = adi_spi_EnableDmaMode(hDevice, false);

CheckSpi(SPIresult);

/* submit the SPI transceiver's buffers */

SPIresult = adi_spi_ReadWrite(hDevice, &Transceiver1);

Audio Signal Processors

interface_with_arduino

spi slave

Blackfin Embedded Processors

adsp-bf706

ADIApproved Reply
May 12, 2016 00:00

Hello,

As this issue is being handled through private support channel. Let's continue the discussion there and post the outcome here, if appropriate.

Thanks,

Jithul

Sudheer Reply
Apr 12, 2017 00:00

Hi SneakyPanda,

I had a look at the following manual:http://www.analog.com/media/en/dsp-documentation/evaluation-kit-manuals/ADSP-BF706_ezkit_mini.pdf

My observations are SPI1_MOSI, SPI1_MISO & SPI1_CLK are multiplexed with PA_02, PA_01 and PA_00. Here PA is GPIO PORT A. The physical pin numbers from the Blackfin processor are 78, 80 & 88. The number 11, 12 & 13 you are seeing are at the connector P5.

To configure pinmux you may have to select as shown in below picture

I guess it is better to start a new thread instead of posting in one year old "Answered" question.

Best Regards,

Sudheer

0cdb37c4d3b40c7bfb2879d5c2ba7ce8.png
0cdb37c4d3b40c7bfb2879d5c2ba7ce8.png
0cdb37c4d3b40c7bfb2879d5c2ba7ce8.png-398x163.png
0cdb37c4d3b40c7bfb2879d5c2ba7ce8.png-398x163.png
SneakyPanda Reply
Apr 12, 2017 00:00

I am also trying to establish communication between an Arduino Uno R3 and the BF706-Mini. Looking at the schematic, it lists pins 11,12, & 13 as SPI1_MOSI, SPI1_MISO, & SPI1_CLK respectively. Using the pin multiplexing plugin, I can't find this configuration under any of the peripherals. Under SPI2, I see pins 11&12 listed correctly as MISO & MOSI respectively, but the other pins are not what they need to be. Any idea what configuration I need inside the pin multiplexing plugin to work with the Arduino compatible pins shown in the schematic?

cncjerry Reply
Jun 28, 2018 00:00

Did you ever get this working? I finally have the toolchain working so that I can go from SigmaStudio->CCES->CLDP to make bootable code. Now I want to control the BF706 from an Arduino using SPI to select various DSP functions. I can always reset the board and step through the functions but would prefer to use the Arduino.

Thanks.

EZAdministrator Reply
Aug 2, 2018 00:00

This question has been assumed as answered either offline via email or with a multi-part answer. This question has now been closed out. If you have an inquiry related to this topic please post a new question in the applicable product forum.

Thank you,
EZ Admin