AnsweredAssumed Answered

BF548 Audio Loopback and LCD Display Merging Problem

Question asked by tarzandavid on Oct 6, 2009
Latest reply on Nov 6, 2009 by tarzandavid

Hi all,


We are using BF548 and connecting the audio part and LCD display and want to display the spectrum on the LCD screen.


What we have done:

1. Run Audio-loopback example, MIC-IN / Audio in sound and play it through the MICROPHONE.

2. Display some generated SIN wave spectrum(time and frequency) on LCD display.

3. Combined Audio-loopback and Display projects in one, but not working.


Difficulties we met:


1. can not controll two drivers (1. audio->AD1980->Sport0 using DMA channel 0(sport0 RX) and DMA channel 1(sport0 TX) and 2. LCD display-> EPPI0-> DMA channel 12 (TX and RX) ) at the same time

2. we leant example named " VideoinLcdout" in BlackfinSDK-3.11 folderpackagewe think there maybe something relating to the DMA priority so we change the priority in the following way,


           adi_dma_SetMapping(ADI_DMA_PMAP_EPPI0,          ADI_DMA_DMA0);


but it still not working. what we found in "ADSP-BF54x Blackfin® ProcessorHardware Reference (Volume 1 of 2) " P262 and P263 saying: the sport0 we are using belongs to DMA controller 0, while EPPI0 belongs to DMA controller 1. And it seems to us that DMA controller 0 has the priority over DMA controller 1, so maybe it's the reason why Audio always play but Display not working.


Btw, In the main funcition we want to run two funcitons 1 audio() and 2 displaypic() sequencely but can only play audio loopback. Only if we close the audio() by using adi_dev_Close(AudioCodecDriverHandle) that we can display on screen.


Also, here is the code segment:


/* Audio AD inbound buffers dataflow handling */
nadi_dev_Read(AudioCodecDriverHandle, ADI_DEV_1D, (ADI_DEV_BUFFER *)&InboundBuffer0)
nadi_dev_Write(AudioCodecDriverHandle, ADI_DEV_1D, (ADI_DEV_BUFFER )&OutboundBuffer0)
nadi_dev_Control(AudioCodecDriverHandle, ADI_DEV_CMD_SET_DATAFLOW, (void *)TRUE)
// adi_dev_Close(AudioCodecDriverHandle);
/* Display Ping-Pong buffers dataflow handling */
nadi_dev_Write(LCDDriverHandle, ADI_DEV_2D, (ADI_DEV_BUFFER *)PingBuffer)
nadi_dev_Write(LCDDriverHandle, ADI_DEV_2D, (ADI_DEV_BUFFER *)PongBuffer)
nadi_dev_Control(LCDDriverHandle, ADI_DEV_CMD_SET_DATAFLOW, (void *)TRUE)





So anyone have any idea how to use two driver at the same time??? Please help us, really appreciated.