how to enable USB_EP2_ISR fun

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

cross mob
sugu_293411
Level 1
Level 1

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

0 Likes
1 Reply
Roy_Liu
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 10 questions asked

How do you judge USB_EP2_ISR is triggered or not?

Some documents for your reference:

Device datasheet

https://www.cypress.com/file/139361/download

Interrupt apps note:

https://www.cypress.com/documentation/application-notes/an90833-psoc-1-interrupts

USB user module datasheet

https://www.cypress.com/file/126441/download

Roy Liu
0 Likes