LPC11U37 USB Virtual Serial Project USB_USBTask Blocking Problem

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC11U37 USB Virtual Serial Project USB_USBTask Blocking Problem

528 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by sarangkalbande on Tue Aug 27 00:00:06 MST 2013
Hi,
I am working on lpc11u37 USB Virtual serial Project.
I got the project from LPCOpen and Its working fine it detects USB as com and echo the characters

Now the problem is,

while (1)
    {


     status=phpalI14443p3a_ActivateCard(&I14443p3a, NULL, 0x00, bUid, &bLength,
                                              bSak, &bMoreCardsAvailable);

     if (status != PH_ERR_SUCCESS)
        {

        Buzzer_Off();
          
        }
     else
        {
     
          status = phalMfc_Authenticate(&alMfc, BLOCK_AUTHENTICATE, PHHAL_HW_MFC_KEYA,
                                         0, 0, bUid, bLength);

             if (status != PH_ERR_SUCCESS)
                {
           
                     Buzzer_Fail();
               
                }
              else
                 {
                   status = phalMfc_Read(&alMfc, 2, &CardDataBuffer[0]);
                   if (status != PH_ERR_SUCCESS)
                     {

                       Buzzer_Fail();
                    

                      }
                   else
                      {
                   Buzzer_Pass();


                
                    UART_Send(&CardDataBuffer[0],0x10); //DATA SEND USING SERIAL
                 
                   EchoCharacters(CardDataBuffer,16);  //data send using USB
                   phpalI14443p3a_Sw_HaltA(&I14443p3a);
                   IsDataAvailable=0;


                       }
                  }
         }


   USB_Task();

}

Now,In the above program USB_Task() function should always be in the while(1) loop.
I have also my card detection logic which always fails at authentication if USB_TASK() Function is dere
But when I comment USB_Task() then everything works fine

what could be the problem..I have tried everything like changing current consumption value,end point polling
interval,disabling all the interrupts except USB then also I am facing the problem.

I think the problem is related to blocking or what?and how to solve the same
Labels (1)
0 Kudos
1 Reply

492 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by sarangkalbande on Wed Aug 28 06:09:52 MST 2013
NXP Team ..kindly reply fast
0 Kudos