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
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:
I see cypress fw already uses "interrupt 0", Do I've to use "interrupt 1"? Can I share "0"? What does mean that number?
Dax
I can't find documentation about writing ISR with C51, so I can't understand what "interrupt X" means inside declarations like this
That's easily fixed:
http://www.keil.com/support/man/docs/c51/c51_le_interruptfuncs.htm
"I spotted the NOIV pragma and for this I'd to put some assembler code like this..."
'#pragma NOIV' affects just to the source file on which it is declared. Make a new source file for your ISR, and you don't need to add the asm code.
Cypress examples uses this pragma to generates a custom jump table for the extended interrupt vectors of the USB ISRs, which is supported by EZ-USB hardware. The interrupt 'number' attached to the USB ISRs has no significance, it is there just to satisfy the syntax.
Tsuneo