Altera_Forum
Honored Contributor
14 years agoAS controller 'override' from NIOS
Hi,
We have gotten into a bit of a mess here and need some Altera Guru help!!! We have inadvertently programmed a large number of boards, many of which are in the field, with an incorrect configuration flash image. Doh! The bad image concatenates the sof for the master FPGA (AS config mode) with an additional SOF, intended for a second FPGA (PS config mode) that we use on a different product, but which is not present on this board. However, because the first sof in the data-stream contains an image for the device that IS present, it configures correctly, conf-done goes high, and it appears that the hardware is working perfectly. The problem arises when we then try to update the flash via the NIOS (using EPCS flash controller) it does not work because the Nios cannot open the device. It looks like the AS controller still has control of the SPI pins, presumably because the configuration stream has not technically finished (it contains an image for another FPGA which is not present). To prove this point, we can manually hold the conf done pin low for a second or so after power-up, and all is well – I assume that the master device simply keeps clocking data and eventually whatever it is that’s counting has had enough and lets go??) So the big question is this.... is there any way (atera 'legal' or otherwise) to force the as controller into letting go of the spi bus so that it can be accessed from the nios? I note that the EPCS control registers are undocumented – is there any way I could twiddle bits in the NIOS code to wrest control of the flash from the config logic? I know that using a Quartus JTAG programmer does the job, but that is no good for units in the field. Any info would be appreciated!! Thanks.