This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How do I generate the NAK response?



Dear all

The USBDevEndpointDataAck() API can generate the ACK response to the host. If i wanna generate the NAK response, what can i do? Thanks :-)

  • Hello Tu,

    Instead of sending a NAK you must send a STALL if the intent is to hold back the tranmission

    Regards
    Amit
  • Hi, Amit

    I don't want to hold back the transmission, i want to do the following flow chart, that I need the NAK response...

    Host                                                   Device

    Bulk Out Packet--------------------->

              <------------------------------------ACK

                                                                Preparing the 10K Data

    Bulk In Packet----------------------->

             <------------------------------------NAK

    Bulk In Packet----------------------->

             <------------------------------------NAK

                                                               Prepare 10K Data finish

    Bulk In Packet----------------------->

             <------------------------------------Send 10K Data

                                                              

  • Hello Tu,

    AFAIK, till the time TXRDY bit in the corresponding USBTXCSRLx register is not set the BULK IN shall be NAK-ed

    Regards
    Amit