Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > What actions are needed to write FX3 images to SRAM and start them?

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



What actions are needed to write FX3 images to SRAM and start them?
Moderator:
RSKV

Post Reply
Follow this topic



What actions are needed to write FX3 images to SRAM and start them?

capiman posted on 20 Apr 2012 5:38 AM PST
Senior Member
18 Forum Posts

What actions are needed to write FX3 images to SRAM and start them?

What i tried to do:

- Write data from parsed Image File (not raw) in 4096 bytes blocks to SRAM.

- Jump to address which is given as last (?) block in image file with length = 0.

Is there anything needed before loading the data? I think there was something like halting the processor in FX2.

Is there anything needed after loading and starting the data? Something like forcing a renumeration (0xA8)?

There are some blocks which go outside SRAM, especially e.g. address 0x00000100 (interrupt vectors?).

These must also be written?

So in general, every block which is contained in an image file must be written?




Re: What actions are needed to write FX3 images to SRAM and start them?

sodafarl posted on 20 Apr 2012 07:07 AM PST
Top Contributor
128 Forum Posts

Hi,

Have a look at application note AN73150. This explains what you have to do and has a source code example for downloading the .img file.  http://www.cypress.com/?rID=56486

Sodafarl

 



Re: What actions are needed to write FX3 images to SRAM and start them?

capiman posted on 21 Apr 2012 01:14 PM PST
Senior Member
18 Forum Posts

Thanks for your answer.


Yes, i already know this app note. I have written my loader after this app note. But my loader does not work.

I download parsed image file in 4096 byte blocks,

read each 4096 byte block back to verify content (content looks ok), then as final step i send a "jump to address x".

Then FX3 (originally as VID=1480, PID=0000) goes away from USB bus, but does not appear again.

When i take USB power away, i can do the same again.

Therefore my question, if something is needed before or after the download and jump sequence to bring

the FX3 back to life after loading my own software.

When i load the same image with Control Center on another computer, it enumerates with new VID / PID and everything is ok.



Re: What actions are needed to write FX3 images to SRAM and start them?

sodafarl posted on 21 Apr 2012 04:01 PM PST
Top Contributor
128 Forum Posts

Hi,

If you follow the software example in the application note then the device should program. There are really only two steps - download the .img file and when finished transfer execution to program entry. Note that the downloaded block will not always be 4096 if it is at the end of a download section. For example a download section might be 34768 bytes long which will be 8 downloads of 4096 and a final download of 2000 bytes. I have attached a text file showing  Visual Basic code to download the image file. This works.

Sodafarl



Re: What actions are needed to write FX3 images to SRAM and start them?

capiman posted on 23 Apr 2012 01:17 PM PST
Senior Member
18 Forum Posts

I have my download util running now. I can confirm that only write to SRAM in max 4096 byte chunks and execute is needed.

All other things work automatically.






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.