1 Reply Latest reply on Aug 27, 2019 3:02 AM by RoyL_01

    how to enable USB_EP2_ISR fun

    sugu_293411

      how CY7C63813 enable  USB_EP2_ISR,

      My USB device is HID,use Endpoint 1 to IN and Endpoint 2 to Out,  bmAttributes is 3(USB_ENDPOINT_TYPE_INTERRUPT)

      but when PC send data to cy7c,it can not triger USB_EP2_ISR. thank you for hlep.

       

      export  USB_EP2_ISR

      export _USB_EP2_ISR

      USB_EP2_ISR:

      _USB_EP2_ISR:

         ;@PSoC_UserCode_BODY_EP2@ (Do not change this line.)

         ;---------------------------------------------------

         ; Insert your custom code below this banner

         ;---------------------------------------------------

         ;   NOTE: interrupt service routines must preserve

         ;   the values of the A and X CPU registers.

      STD_EP2:    EQU     1   ; Set this equate to 0 to remove the standard

                              ; endpoint handling code

         ;---------------------------------------------------

         ; Insert your custom code above this banner

         ;---------------------------------------------------

         ;@PSoC_UserCode_END@ (Do not change this line.)

       

       

      IF  STD_EP2

          PUSH A

          XOR     [USB_EPDataToggle], 4 ; Update EP2 data toggle

          MOV     A, REG[EP2MODE]            ; Get the mode

          MOV     [USB_EndpointAPIStatus + 2], EVENT_PENDING ; For the API

          POP A

          RETI