We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi frnds,
I am working on Cypress EZ-USB CY768013A while analyzing the code i found many interrupts with same interrupt number as " interrupt 0 " , though this EZ Cypress usb chip has AUTOVECTOR facility, I would like to know how all these interrupt functions are executed with same Interrupt number in EZ CYPRESS USB chip ???
void ISR_Sudav(void) interrupt 0 { printf("Data\n"); GotSUD = TRUE; // Set flag EZUSB_IRQ_CLEAR(); USBIRQ = bmSUDAV; // Clear SUDAV IRQ } // Setup Token Interrupt Handler void ISR_Sutok(void) interrupt 0 { printf("Token\n"); EZUSB_IRQ_CLEAR(); USBIRQ = bmSUTOK; // Clear SUTOK IRQ } void ISR_Sof(void) interrupt 0 { printf("SOF\n"); EZUSB_IRQ_CLEAR(); USBIRQ = bmSOF; // Clear SOF IRQ } void ISR_Ures(void) interrupt 0 { printf("Ureq\n"); if (EZUSB_HIGHSPEED()) { pConfigDscr = pHighSpeedConfigDscr; pOtherConfigDscr = pFullSpeedConfigDscr; } else { pConfigDscr = pFullSpeedConfigDscr; pOtherConfigDscr = pHighSpeedConfigDscr; } EZUSB_IRQ_CLEAR(); USBIRQ = bmURES; // Clear URES IRQ } void ISR_Susp(void) interrupt 0 { printf("Sup"); Sleep = TRUE; EZUSB_IRQ_CLEAR(); USBIRQ = bmSUSP; }
Hi Thomas,
please tell me, which interrupt number i have to mention after my interrupt function code??
ex:
void ISR_DATAREV(void ) interrupt ?
Rajesh
well if your code uses NOIV the interruptno will not be used so any no will do it. This only means that keil does not generate any interupt entery code. The usb interupt is then handled by jumptable.a51. (i am not sure of the name) just search in the library. Usually thats part of ezusb.lib but you can include it to your own projects too. I can not tell you the righ way for you because i never did use that lib but use my own way. Anyway the docs will tell you the right way Andi is right. BTW: you know that ezusb.lib has to be compiled for your chip?
Thomas