This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Cypress ez-usb and interrupts

Hi all,

I'm dealing with a cy7c68013a and the framework cypress provide. The fw use a jump table for usb interrupt but I've to add some ISR for INT0 and serial comm.

Do I need a .a51 file like this?

;INT0 vector handler
EXTRN CODE (ISR_INT0)
CSEG AT 0003H LJMP ISR_INT0
END

And inside C code:

void ISR_INT0(void) interrupt 0
{...}

What does mean "interrupt 0"?
I can't find documentation about syntax of ISR ...
fw already uses "interrupt 0" do I've to use 1?

Thanks a lot

Parents
  • Thanks for your help guys!

    Maybe I didn't explain myself too well ...
    I spotted the NOIV pragma and for this I'd to put some assembler code like this: "CSEG AT 0003H LJMP ISR_INT0".

    My doubt was about C code. I can't find documentation about writing ISR with C51, so I can't understand what "interrupt X" means inside declarations like this:

    void ISR_INT0(void) interrupt 0
    {...}

    I see cypress fw already uses "interrupt 0", Do I've to use "interrupt 1"? Can I share "0"? What does mean that number?

    Thanks a lot

    Dax

Reply
  • Thanks for your help guys!

    Maybe I didn't explain myself too well ...
    I spotted the NOIV pragma and for this I'd to put some assembler code like this: "CSEG AT 0003H LJMP ISR_INT0".

    My doubt was about C code. I can't find documentation about writing ISR with C51, so I can't understand what "interrupt X" means inside declarations like this:

    void ISR_INT0(void) interrupt 0
    {...}

    I see cypress fw already uses "interrupt 0", Do I've to use "interrupt 1"? Can I share "0"? What does mean that number?

    Thanks a lot

    Dax

Children