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

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

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?

0 Likes
4 Replies
LiMa_282146
Level 4
Level 4
First like given

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

0 Likes
Anonymous
Not applicable

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.

0 Likes
lock attach
Attachments are accessible only for community members.
LiMa_282146
Level 4
Level 4
First like given

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

0 Likes
Anonymous
Not applicable

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.

0 Likes