CyU3PDmaChannelGetBuffer() return 68 problem

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi!

   

I want to write a wave to be transmited .The program is following

   

for (;;)

   

{
             for(i=0;i<256;i++)
               {  result =128*(sin(p*i/255)+1);
               y=(uint16_t)result;
               x=y;
               }
         status=CyU3PDmaChannelGetBuffer(&glChHandleBulkLp,&buffer_p,CYU3P_NO_WAIT);
         for(j=0;j<256;j++)
            {
                buffer_p.buffer=(uint8_t)x;
             }
         if (status == CY_U3P_SUCCESS)
                 {
                    
                     status = CyU3PDmaChannelCommitBuffer (&glChHandleBulkLp, buffer_p.count, 0);
                     if (status != CY_U3P_SUCCESS)
                     {
                         CyU3PDebugPrint (4, "CyU3PDmaChannelCommitBuffer failed, Error code = %d\n", status);}
                 }

   

}

   

When I run by steping, CyU3PDmaChannelGetBuffer() return 68. I don't know where is my problem

   

I do hope you can help me. Thank you!

0 Likes
1 Reply
Anonymous
Not applicable

 Hi,

   

Error code 68 refers to CY_U3P_ERROR_NOT_CONFIGURED.This happens when the DMA channel has not been configured properly.Please post the code for DMA channel creation so that we can have a look at it.

   

Regards,

   

Subha

0 Likes