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.
Hello
I'm developing an application on the Cypress CY7C68013 USB controller. How can I enable and manage the INT5 interrupt? In all my tries, when the interrupt occurs (falling edge on the pin), the firmware freezes. Which function does the code call when the interrupt occurs?
Thanks
I know that is the 8051 hardware that cause the execution to jump to the vector location, but this in the .c template code is an abstraction represented by a group of ISR functions (i.e. ISR_Ep0in, ISR_Ep0out, ecc.) that are automatically called when an interrupt occurs. Obviously, once compiled the corresponding opcode is mapped at the right addresses in program memory. The problem is that the INT5 is not present in the standard 8051, nor in the template code, and every example I found are just about USB interrupts of the Cypress chip.
(i.e. ISR_Ep0in, ISR_Ep0out, ecc.) that are automatically called when an interrupt occurs.
Certain interrupts with the Cypress chip employ what they refer to auto-vectoring. The libraries supplied by Cypress will vector to the functions that you describe. INT5 is not one of these interrupts that employ auto-vectoring however. There probably is no handler present for this interrupt unless you have provided it yourself. Check the interrupt vector location for INT5 (0x5B?) in your MAP file (or in the simulator) and see what code is present there. Does it handle the interrupt?
"The problem is that the INT5 is not present in the standard 8051"
C51 supports it - Documneted here: http://www.keil.com/support/man/docs/c51/c51_le_interruptfuncs.htm
There probably is no handler present for this interrupt unless you have provided it yourself.
I think so: I found only the file USBJmpTb.A51 that contains only the jump table for the USB interrupts. How can I include a handler for other interrupts? Is there any example of this? Thanks
forget the table if you have just an elementary understanding of math
interrupt_number = (vector_address -3)/8
Erik
"How can I include a handler for other interrupts?"
http://www.keil.com/support/man/docs/c51/c51_le_interruptfuncs.htm