FTDI Cable / Adapter AVR Programmer. There are two ways to program an AVR microcontroller. One is to reprogram the entire chip using an AVR programmer. The other is to use a bootloader that is pre-programmed onto the chip that allows the chip to re-program itself. SF600Plus is designed with ISP header, through an appropriate connector, users can connect the programmer and drive the SPI signals, supply the memory and control the controller or application status.
$begingroup$I'm looking to make a system that can be upgraded by a customer in the field and I need to know some conceptual thing before I try implementing my current strategy.
Say I have a USB to SPI bridge, some FTDI chip, and I want to be able to program an SPI flash using that. Cool no problem BUT my controller has to boot from the same SPI flash using SPI lines. So would I be able to just connect everything together?
Here is a picture since I'm not good at explaining these things.
There is a typo on the picture. The controller isn't being programmed, the SPI flash is. The controller will boot from the spi flash
Funkyguy
FunkyguyFunkyguy2,78511 gold badge1313 silver badges4141 bronze badges
$endgroup$2 Answers
$begingroup$It should be possible to connect two masters to the same SPI bus provided that
- Neither device tries to drive SCK, MOSI, or SS when the other device wants to use it (though SS should be weakly pulled up when idle, and other pins weakly pulled to some defined level).
- The devices have some means of staying out of each other's way.
I don't know whether the FTDI bridge expects to be a master or slave; if it expects to be a master but floats its wires except when told by the PC to feed data, and if it has some means of holding the main processor in reset, a direct connection should work out very nicely. If it expects to be an SPI slave, then the microcontroller firmware will have to talk to the bridge, read data from it, and feed that data to the flash itself.
supercatsupercat38.7k11 gold badge6565 silver badges114114 bronze badges
$endgroup$$begingroup$Usually this will work if the output drivers from your controllers are disabled in reset state.
What we've done in the past to ensure the desired behaviour under certain circumstances is to use a Mux e.g. an ADG794 to be absolutely sure. You can also add 0R resistors on the lines once you have verified the correct behaviour and do not require a switch.
Make sure, you are also able to drive any required configuration pins on the FPGA (e.g. PROGRAM_B on Zylinx devices) and on your controllers (e.g. some RESET pin on your USB bridge).
Tom L.Tom L.6,79011 gold badge1212 silver badges2929 bronze badges
$endgroup$