Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21608 Discussions

EPCS4 Programming Errors

Altera_Forum
Honored Contributor II
1,831 Views

I am having trouble programming an EPCS4 via a USB-Blaster cable. When I use the programmer to program the EPCS4 it reports that the device programs successfully, but the 'Verify' step always fails. When I 'Examine' the device, the readback from the part matches an older programming file that was used to configure the board before I received it. I.e., although the programmer reported that the device programmed successfully, clearly it did not. 

 

I am also unable to erase the part, and receive similar feedback from the tool: the erase says it completes successfully, but the Blank-check fails. 

 

When I probe the ASDI and DATA pins during configuration, I get the following returned from the 'Read Status' command: b'0001 0110. According to the EPCS4 datasheet, this means the device is "protected" in all sectors. I take this to mean I am unable to write to the device in the current configuration, hence my inability to program it. 

 

I have searched the Altera website and this forum, but I can find no information on how to use Quartus-II or the programmer to clear the memory protection bits.  

 

Does anyone know if this is why I am unable to program the EPCS4? Do these 'protection' bits need to be reset manually, or should it happen automatically when I try to program the part? 

 

Thanks--
0 Kudos
6 Replies
Altera_Forum
Honored Contributor II
1,204 Views

I don think, that protection is involved with normal operation of the Quartus programmer. It does neither set nor reset it. That's why it most likely isn't aware of set protection bits and doesn't give appropriate error messages.

0 Kudos
Altera_Forum
Honored Contributor II
1,204 Views

quartus programmer doesn't check for the protection bits when performing the erase and program operations. it will continue its operation even though there are protected sectors, but the protected sectors won't be overwritten. 

 

to reset the block protect bits in the status register, try to look at this megafunction: altasmi_parallel; it contains all the operations regarding the EPCS device such as block erase, sector erase, read status, write status. you can use the write status operation to reset the block protection bits.
0 Kudos
Altera_Forum
Honored Contributor II
1,204 Views

It does look like the altasmi_parallel megafunction would allow me to reset the protection bits, but I'm not sure how to get it into my design. The board I am working with does not have a JTAG interface, so the only way I can configure the Cyclone is via the EPCS4 chip. This is why I was looking for a way to reset these bits via the Programmer or some other software.  

 

I considered programming another Cyclone board I have with the altasmi_parallel megafunction and connecting it to the EPCS4 via the 10-pin interface, but I don't see how I can do this the way the megafunction is constructed (there are no ASDI, nCS, DCLK or DATA ports).  

 

So I guess I'm left with either writing my own interface for the second Cyclone board using the timing specified in the Configuration Handbook or else trying to hack-on a JTAG interface to the board I'm using.  

 

Is there really no way using Quartus-II to reset these protection bits without having to program the FPGA itself first?
0 Kudos
Altera_Forum
Honored Contributor II
1,204 Views

hmm, means that u can only load your design onto the board through active serial interface to the EPCS device. but sorry to say currently the programmer don't have any settings to modify the block protect bits in the status register of the EPCS device. 

 

btw, the altasmi_parallel megafunction does the operations onto the EPCS device internally, that's why you don't see any ports (ASDI, etc).
0 Kudos
Altera_Forum
Honored Contributor II
1,204 Views

It's still mysterious how you managed to get the protection bits set. Did you or someone else previously use the board with a design involving EPCS programming actions? I don't know the functionality of the NIOS flash tools, they may have additional functions in this regard. Generally I see at least these options: 

 

- Connect a hardware programmer to the EPCS device through the AS connector. EPCS4 is basically compatible to industry standard serial 4 MBit flash, e.g. Numonyx M25P40. 

- Desolder the device and put it into a hardware programmer 

- Write your own software to control Altera programming hardware. It's easy with ByteBlaster II, but requires knowledge of an undocumented interface with USB Blaster. The USB Blaster hardware can be connected through FTD2XX.DLL directly, but you need to know the commands to control the programming signals.
0 Kudos
Altera_Forum
Honored Contributor II
1,204 Views

Yes FvM, it is a mystery to me as well! This is a development board that was sent to me with the flash already programmed and in this state. Why they elected to not provide JTAG access to the Cyclone part is beyond me--there is plenty of room on the board.  

 

Anyway, thank you both for the ideas. I think the first thing I will try is to get JTAG access to the FPGA (luckily it is a pinned part and not a BGA). If that doesn't work, I'll either try the direct USB-Blaster method (or just order a ByteBlaster-II) or use the GPIO header from another Cyclone board to re-write the protection bits by hand.
0 Kudos
Reply