AnsweredAssumed Answered

BF506F AD7266

Question asked by jwestpak on Oct 19, 2012
Latest reply on Oct 25, 2012 by CraigG

Hi,

  I am working on a relatively simple program that converts an analog input into a duty cycle for an amplifier project.  I am still really new at DSP programming so I started with the AD7266_and_ACM example project for the BF506f ez-kit lite.  However, I am struggling to modify the project so that the ADC is continuously polling.  I have tried implementing  a loop to get the next buffer.

The code I added is as follows:

 

while(foo){

     result = adi_ad7266_IsBufferAvailable(hDevice, &bAvailable);

             CheckResult(result);

          if (bAvailable)

             {

               result = adi_ad7266_GetBuffer(hDevice, (void **)&pBuffer);

               CheckResult(result);

                     if (pBuffer){

                                   printf("%i\n",*pBuffer);

                         }

             }

     }

 

Using printf as debug statements, I have determined that the GetBuffer command is throwing back SPORT_FAILURE.

Where am I going wrong?

 

Thanks

Jonathan

Outcomes