Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/23/03 22:14
Read: times


 
#61310 - RE: cypress Fx2 (cy7c68013)-usb_int problem
Responding to: ???'s previous message
Anyhow, the '51 is a harward architecture where code memory and data memory is separate, thus slef-modifying code is impossible.

The Cypress Fx2 is not quite a '51. It has an 8051 core with some extra peripherals.

Most of the internal RAM in the Fx2 is von Neuman wired, as is the external RAM on Cypress' development board if I remember correctly.

The USB autovector is not quite self modifying code: What happens is that, with the interrupt vector in internal RAM the least significant byte of the USB interrupt address is automatically replaced by the USB SIE with a number that represents the type of USB interrupt that occured (there are a couple of dozen types). The high byte represents the page address of the USB jump table. Thus different types of interrupt jump to different points in the table and the table can contains jumps to different ISRs.

Looking at your code two things imediatly occur to me:

(1)After:-

setb EA


should the code go into some sort of loop?
As written it would continue through the interrupt routine and get to 'reti' without having jumped into an interrupt.

(2)I'm not sure about:-

mov dptr,#EP2BCL ; load anything to byte count to re-arm


You need to think about source/sink of USB traffic at the host end. I think the byte count of OUT endpoints needs to be reset to zero to allow the host to send another packet while IN endpoints need a number of bytes which the host must receive.

Many useful example can be found at www.cypress.com

HTH

Paul



List of 7 messages in thread
TopicAuthorDate
cypress Fx2 (cy7c68013)-usb_int problem            01/01/70 00:00      
   RE: cypress Fx2 (cy7c68013)-usb_int problem            01/01/70 00:00      
      RE: cypress Fx2 (cy7c68013)-usb_int problem            01/01/70 00:00      
         RE: cypress Fx2 (cy7c68013)-usb_int problem            01/01/70 00:00      
            RE: cypress Fx2 (cy7c68013)-usb_int problem            01/01/70 00:00      
               RE: cypress Fx2 (cy7c68013)-usb_int problem            01/01/70 00:00      
                  RE: cypress Fx2 (cy7c68013)-usb_int problem            01/01/70 00:00      

Back to Subject List