<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Interrupt no. for Bulk EndPoint 2 for CY7C64613</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/18710/interrupt-no-for-bulk-endpoint-2-for-cy7c64613</link><description> I have written a firmware to download bulk data from my pc to an onboard flash which is interfaced using a cypress EzUSB-Fx chip(CY7C64613). I am using bulk endpoint 2 to send the 64 byte packets from the pc to the board. 
 
As soon as I setup up 64</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Interrupt no. for Bulk EndPoint 2 for CY7C64613</title><link>https://community.arm.com/thread/73105?ContentTypeID=1</link><pubDate>Tue, 22 Mar 2005 07:08:38 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:936334ae-30e5-4bed-a69e-a422714da606</guid><dc:creator>Ashish Sin</dc:creator><description>&lt;p&gt;Thanks Jay, I think I did get confused and ur post really helped me clear up the clutter in my mind. Sorry for not replying earlier, as I was travelling.&lt;br /&gt;
&lt;br /&gt;
Interrupt 8 is ofcourse the one which would be raised when the OUT2BUF is loaded, and I would need to define a jump table to offset the jump to 0x2C for EP2OUT interrupt. Any idea as to how do I define a jump table on a page boundary  in C.&lt;br /&gt;
&lt;br /&gt;
I came across an assembly file &amp;#39;USBJmpTb.a51&amp;#39;, which I have reproduced below, which is a JUMP table. But am not sure as to how to include this file in my keil project which is in C.&lt;br /&gt;
&lt;br /&gt;
NAME		USBJmpTbl&lt;br /&gt;
&lt;br /&gt;
extrn		code (ISR_Sudav, ISR_Sof, ISR_Sutok, ISR_Susp, ISR_Ures, ISR_IBN, ISR_Ep0in, ISR_Ep0out, ISR_Ep1in, ISR_Ep1out, ISR_Ep2in, ISR_Ep2out, ISR_Ep3in, ISR_Ep3out, ISR_Ep4in, ISR_Ep4out, ISR_Ep5in, ISR_Ep5out, ISR_Ep6in, ISR_Ep6out, ISR_Ep7in, ISR_Ep7out)&lt;br /&gt;
public		USB_AutoVector, USB_Jump_Table&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;------------------------------------------------------------------------------&lt;br /&gt;
; Interrupt Vectors&lt;br /&gt;
;------------------------------------------------------------------------------&lt;br /&gt;
		CSEG	AT 43H&lt;br /&gt;
USB_AutoVector	equ	$ + 2&lt;br /&gt;
		ljmp	USB_Jump_Table	; Autovector will replace byte 45&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;------------------------------------------------------------------------------&lt;br /&gt;
; USB Jump Table&lt;br /&gt;
;------------------------------------------------------------------------------&lt;br /&gt;
?PR?USB_JUMP_TABLE?USBJT	segment	code page	; Place jump table on a page boundary&lt;br /&gt;
		RSEG 	?PR?USB_JUMP_TABLE?USBJT	; autovector jump table&lt;br /&gt;
USB_Jump_Table:&lt;br /&gt;
		ljmp	ISR_Sudav	; Setup Data Available&lt;br /&gt;
		db	0&lt;br /&gt;
		ljmp	ISR_Sof	; Start of Frame&lt;br /&gt;
		db	0&lt;br /&gt;
		ljmp	ISR_Sutok	; Setup Data Loading&lt;br /&gt;
		db	0&lt;br /&gt;
		ljmp	ISR_Susp	; Global Suspend&lt;br /&gt;
		db 	0&lt;br /&gt;
		ljmp	ISR_Ures	; USB Reset&lt;br /&gt;
		db	0&lt;br /&gt;
		ljmp	ISR_IBN	    ; IN Bulk NAK interrupt&lt;br /&gt;
		db	0&lt;br /&gt;
		ljmp	ISR_Ep0in	; End Point 0 In&lt;br /&gt;
		db	0&lt;br /&gt;
		ljmp	ISR_Ep0out	; End Point 0 Out&lt;br /&gt;
		db	0&lt;br /&gt;
		ljmp	ISR_Ep1in	; End Point 1 In&lt;br /&gt;
		db	0&lt;br /&gt;
		ljmp	ISR_Ep1out	; End Point 1 Out&lt;br /&gt;
		db	0&lt;br /&gt;
		ljmp	ISR_Ep2in&lt;br /&gt;
		db	0&lt;br /&gt;
		ljmp	ISR_Ep2out&lt;br /&gt;
		db	0&lt;br /&gt;
		ljmp	ISR_Ep3in&lt;br /&gt;
		db	0&lt;br /&gt;
		ljmp	ISR_Ep3out&lt;br /&gt;
		db	0&lt;br /&gt;
		ljmp	ISR_Ep4in&lt;br /&gt;
		db	0&lt;br /&gt;
		ljmp	ISR_Ep4out&lt;br /&gt;
		db	0&lt;br /&gt;
		ljmp	ISR_Ep5in&lt;br /&gt;
		db	0&lt;br /&gt;
		ljmp	ISR_Ep5out&lt;br /&gt;
		db	0&lt;br /&gt;
		ljmp	ISR_Ep6in&lt;br /&gt;
		db	0&lt;br /&gt;
		ljmp	ISR_Ep6out&lt;br /&gt;
		db	0&lt;br /&gt;
		ljmp	ISR_Ep7in&lt;br /&gt;
		db	0&lt;br /&gt;
		ljmp	ISR_Ep7out&lt;br /&gt;
		db	0&lt;br /&gt;
;&lt;br /&gt;
		end&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Interrupt no. for Bulk EndPoint 2 for CY7C64613</title><link>https://community.arm.com/thread/43720?ContentTypeID=1</link><pubDate>Wed, 16 Mar 2005 14:52:19 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:480b0017-d3e5-4885-9bc5-9fe4ac896ea8</guid><dc:creator>Jay Daniel</dc:creator><description>&lt;p&gt;Ashish,&lt;br /&gt;
&lt;br /&gt;
   Something about your message seems confused.  The 8051 architecture has interrupt vectors starting at code address 0x0003 and reserving 8-bytes of code space for each vector.  This puts the closest vector location to 0x2C beginning at 0x002B (interrupt 5).  Thus, there&amp;#39;s no way to use the interrupt keyword to define an interrupt in Keil that&amp;#39;s located at that location.  I&amp;#39;m not sure, but the compiler might not complain if you manually location something there to jump to your actual ISR.&lt;br /&gt;
&lt;br /&gt;
  What I suspect more, however, is that you&amp;#39;ve got something confused and this isn&amp;#39;t where your processor will actually vector when this event occurs.&lt;br /&gt;
&lt;br /&gt;
  Taking a moment to refer to the datasheet, I can see that you&amp;#39;ve got things really messed up with regard to the way interrupts on this chip work.  This chip has ONE USB interrupt for all of these various &amp;quot;endpoints&amp;quot; and then an &amp;quot;autovectoring&amp;quot; function to unload some work from the processor.  This 0x2C offset you mention is in a table that you have to setup on some page boundary.  So... the interrupt function you actually have to write is interrupt number 8 as far as Keil&amp;#39;s concerned.  If you have the autovector function enabled and some byte offset loaded into the buffer, then it will translate the LJMP instruction in interrupt 8 in a manner that sends you to this jump table you&amp;#39;ve created on some page.  That&amp;#39;s where the offset 0x2C comes in.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>