AnsweredAssumed Answered

Reading the ADC on BF506F

Question asked by HeikkiL on Jul 3, 2016
Latest reply on Jul 14, 2016 by HeikkiL

Hi there,

I am prototyping a software-defined radio transceiver using an ADSP-506F_EZKIT and the embedded

 

ad7266 converter. I am able to read the ADC using the Driver library functions in the following way:

 

 

loop

 

{

 

   adi_ad7266_IsBufferAvailable(); 

 

   if(available)

 

   {

 

      adi_ad7266_GetBuffer();

 

   Receiver processing using the ADC samples;

 

   adi_ad7266_SubmitBuffer;

 

   }

 

}

 

However, this principle is very clumsy for typical multi-rate receiver processing, where the whole processing is not executed at the ADC sample rate, but the processing sampling rate is lowered by decimation. A much better way would be to configure the DMA/SPORT/ACM so that the AD converter runs continuously and the ADC results are red in an interrupt or callback handler writing them into an elastic buffer, e.g. a ring buffer, passing the ADC samples to the actual receiver processing. The following simplified pseudo-code depicts the desired principle:

 

 

Callback or interrupt handler executed when new AD conversion results ready

 

{

 

   read the AD conversion;

 

   store the AD samples into a ring buffer;

 

}

 

 

Processing loop wherein the actual signal processing takes place:

 

loop

 

{

 

   if(sufficient number of new samples in the ring buffer)

 

   {

 

      Receiver processing using the AD samples;

 

   }

 

}

 

I have found neither proper Driver library functions nor examples for configuring the mechanisms in the manner above.

I would appreciate much any examples and suggestions.

 

Kind regards,

Heikki

Outcomes