Forum Discussion
Altera_Forum
Honored Contributor
19 years agoThat's kind of what we've been trying to do all along, running the Altera in Passive Serial mode and having the Atmel initiate the read command before enabling the configuration on the Altera and then just sitting back and generating a clock while the bitstream loads.
What you're suggesting, at its face, won't work since the Continuous Read commands require an address to be specified in the command, so the Altera will override it. However, a slightly changed procedure might work: 1) Hold nCONFIG low. 2) Activate the AVR's SPI port. 3) Pull nCSO low. 4) Send the start of the Continuous Read command (0x03, AH, AM, AL). 5) Deactivate the SPI port. 6) Release nCONFIG, but keep nCSO low. 7) Altera does its thing in AS mode, which hopefully only does its own Continuous Read command, which just wastes the first four bytes in the flash (which should be programmed to 0xFF anyway). 8) When the Altera is done, release nCSO, turning over the ASMI port to the Altera. Flash programming can be achieved through the usual Nios Flash Prorammer means. The Altera would therefore be wired for Active Serial (MSEL[1:0] = 00). Since nCSO and ASDO are driven as outputs in that mode, they would need to go through series 4.7K or so resistors so that the Atmel can overdrive them when it needs to. This is an interesting possibility. I'm going to be hooking up the EPCS1 on one of my boards to see what it does.