Forums

EZ USB FX2

Started by mimran May 16, 2006
Hi All, 
I am using EZ USB FX2 dev kit. I am just new to this all and need to
program 8051 through a firmware program. I am working in windows
environment. I need help about how to start and specially in finding some
sample "firmware Program" which can be compiled through keil.

Thanks in advance



You will need to load in the Keil Assembler output Intel Hex file.


Reset the FX2's 8051 like this:
...
        ResetUSB8051(TRUE);


bool CUSBFirm::ResetUSB8051(UCHAR reset)
CCyControlEndPoint  *ctrlEpt = m_pFX2Device->ControlEndPt;

 ctrlEpt->Target    = TGT_DEVICE;
 ctrlEpt->ReqType   = REQ_VENDOR;
 ctrlEpt->Direction = DIR_TO_DEVICE;
 ctrlEpt->ReqCode   = 0xA0;  //ANCHOR_DOWNLOAD
 ctrlEpt->Value     = 0xE600;  //7F92?
 ctrlEpt->Index     = 0;

 UCHAR ucStop = reset;
 LONG lBytesToSend = 1;
 if(false == ctrlEpt->Write(&ucStop,lBytesToSend))
.....

Then.. Parse the intel hex file and send the address/data down to the FX2 a 
line at a time and lift the 8051 Reset like this

ResetUSB8051(FALSE);

That's all I am gonna give you on the Windows side.. gotta do some of this 
yourself!

The docs for doing this are on the Cypress Website..








"mimran" <Muhammad@delfic3.nl> wrote in message 
news:6sKdnWa0G_xKefTZRVn-qg@giganews.com...
> Hi All, > I am using EZ USB FX2 dev kit. I am just new to this all and need to > program 8051 through a firmware program. I am working in windows > environment. I need help about how to start and specially in finding some > sample "firmware Program" which can be compiled through keil. > > Thanks in advance > > > >
nappy wrote:
<snip>
> > The docs for doing this are on the Cypress Website.. >
There's a tutorial, and several demo apps there also.