BF506F AD7266

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

Parents
  • 0
    •  Analog Employees 
    on Aug 2, 2018 4:43 PM
    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
Reply
  • 0
    •  Analog Employees 
    on Aug 2, 2018 4:43 PM
    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
Children
No Data