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

Register an audio signal in real time with a 2d buffer

Processors & DSP mandrei 325 Mar 25, 2019 00:00 1 replies Original on forum ↗
Subscribe
mandrei 325 Question
Mar 25, 2019 00:00

I'm trying to calculate the position of a sound source using a microphone array. I'm using a blackfin ADSP-bf533 ez kit lite. It features 4 analog input ports (from which I though plugging the microphones into). I know that I need to apply cross-correlation function among the 4 microphone signals.

Documentation supports only the DMA registers configuration and that's all. What do I need to do to implement Ping-Pong buffers method for those signals ?

This is what I have already done:

*pDMA1_PERIPHERAL_MAP = 0x1000;

// Configur DMA1
*pDMA1_CONFIG =0x101B;
*pDMA1_START_ADDR = (void*)iRxBuffer1; // adresa de start
*pDMA1_X_COUNT = 16;
*pDMA1_X_MODIFY = 4; //pentru date pe 32 biti
*pDMA1_Y_COUNT = 4; //numar sub-bufere
*pDMA1_Y_MODIFY = 4;

// Set up DMA2 to transmit
// Map DMA2 to Sport0 TX
*pDMA2_PERIPHERAL_MAP = 0x2000;

// Configure DMA2
*pDMA2_CONFIG = 0x101B ;
*pDMA2_START_ADDR = (void*)iTxBuffer1; // adresa de start
*pDMA2_X_COUNT = 16;
*pDMA2_X_MODIFY = 4; //pentru date pe 32 biti
*pDMA2_Y_COUNT = 4; //numar sub-bufere
*pDMA2_Y_MODIFY = 4;

adsp-bf533

Audio Signal Processors

dma

bf533

buffer

ping-pong

Blackfin Embedded Processors

blackfin

dsp audio

Show More

ADIApproved Reply
Apr 12, 2019 00:00

Hi,

Please refer the Two-Dimensional DMA that have More 2D DMA Examples (PageNo:401 / 884) in the HRM of ADSP-BF533
https://www.analog.com/media/en/dsp-documentation/processor-manuals/ADSP-BF533_hwr_rev3.6.pdf

It is possible to perform the ping-pong buffer processing in BF533.BF533 DMA's support DMA descriptor mode. This is equivalent to TCB in SHARC. You can create two DMA descriptors( 2 DMA work unit).You can make these two work unit point to each other. So DMA will keep on filling these buffers in circular buffer manner. You can then process the buffer which is not being filled by DMA. I have attached simple MDMA code with DMA configured in descriptor mode, I hope this will be helpful.

MDMAdescriptor.zip

Please refer the code which is available in the below installation path, that might be help for this.
C:\Program Files (x86)\Analog Devices\VisualDSP 5.1.2\Blackfin\Examples\ADSP-BF533 EZ-KIT Lite

Regards,
Lalitha S