Programming steps are clearly documented in the following application note. Please follow them:
Actually, you will be connecting a USB device to the connector that is provided on the board. You can try programming the SPI flash present on the board with the host image file.
Otherwise please follow as per the application note.
Hi Sai Krishna,
I have gone through this document.
In this document how to compile (creating .img file ) is explained. Then running it with Zylin Debugger is explained.
Programming either SPI Flash or RAM of FX3 board with a PC/Laptop using USB3.0 cable is not explained.
That is why I am getting doubt.
I think Zylin Debugger is connected through JTAG connector. ( not through USB connector ).
Suppose we program the .img file of USBHost example Application into either SPI flash, I2C E2PROM or RAM with the help of the Tool "Control Center", from a PC/Laptop, by using a USB3.0 cable.
Then after the .img is programmed into the FX3 board, the USBHost application example shall be running on the board. Immediately we cannot remove the USB3.0 cable.
So atleast for a few seconds of time, a Host PC shall be connected to the USB port of the FX3 board, while the USBHost Application is running.
Would it cause a hardware damage?
Or the Host software in the FX3 board, protect the hardware ? ( There are some switching OFF and switching ON of VBUS routines in the software )
We don't have a Zylin Debugger or any other JTAG programmer. So at present, we have to program by using USB3.0 cable only.
Any cheaper JTAG programmer ( we don't require debugging feature ) available for programming the FX3 board?
I assume you are following the document which Sai Krishna pointed out.
The safest option is to load the code through JTAG. If you do not have JTAG adapter. You could try the following steps:
1) Connect the FX3 DVK in USB boot mode and load the USBHost firmware into SPI flash.(J101,102,103,104 need to connected for SPI)
2)Disconnect the FX3 kit from PC. Change the PMODE setting to boot from SPI.
3) Make the jumper settings for Host mode (as shown in Figure 3 of the above mentioned document)
4)Connect a device to FX3 and power the board with an external supply. (Make sure VBatt J143 is connected to 5V). The FX3 will boot up from SPI and will now be in Host mode
5)Now change J101,102,103,104 to UART to get the debug messages.
As You Suggested, First I program the USBSlave.img(which is already working) file in SPI Flash, after setting J101-104 in 2-3 position.
The I switched OFF the Power Supply. After setting J101-104 in 1-2 position, and setting the jjumbers J96,J97,J98 and SW25 for boot from SPI flash, I switched ON the Power Supply. But the Application is not running.
But after setting J101-104 in 2-3 position with jumbers J96, J97,J98 and SW25 for boot from SPI flash, when I swicthed ON, the application is working fine.
Here what I am thinking is, for a program which is stored in SPI flash to run, J101-104 must be in 2-3 position. But then I shall not get RS232 messages.
If I can load the firmware (.img file) in I2C E2PROM, the problem would be solved. But when I attempt to program the I2C E2PROM, it is showing the message "Programming of EEPROM failed". (even after closing J42 and J45).
I had tried the same while devolopng slave mode also, but it was not working. But programming SPI flash is working fine.
I am using SMD 24LC256 IC, and it is connected to DIP with some wires.
Would You please suggest, what could be the reason for E2PROM programming failure. If that is corrected, my problem would be solved.
Problem is with the EEPROM that you are using.
24LC256 has just 256Kbits (which is nothing but 32KB) capacity. It is not sufficient to store the .img file of FX3.
You may need to go for 24LC1024 which has 128KB capacity. (multiple if code size is more than 128KB).
Hi Sai Krishna,
We are purchasing Microchip 128kb, I2C EEPROM IC.
Make sure you double-check the image size and have a little extra EEPROM space, to accommodate the changes you make to the code, if any.