Using external memory run AN2131

Question: How to run AN21xx device with the code on an external flash?

 

Answer:

Theusb  core does not directly support uploading code from the EEPROM to external memory. The usb core can only load the lower 8k bytes. So, you'll need to implement a small "helper" firmware that knows how to load code to your external memory. You can use the vend_ax example (and source code) under the examples directory to see how we do this. Another directory to check out is C:\Cypress\USB\Target\LoadExt (see the readme.txt).

You will want to have the usb core bootload a small loader image into "somewhere" in the low 8k code space then let go of the 8051 reset - as typically done. At this point you may wish to have this firmware also enumerate on the bus, then do the loading procedure for the upper memory space from the serial eeprom contents (location of your choosing.)