關(guān)于xilinx fpga flash燒錄失敗報錯cannot set write enable bit or block(s) protected
最近買了塊新板子,固化程序一次就燒錄不了,報錯ERROR: [Labtools 27-3347] Flash Programming Unsuccessful: cannot set write enable bit or block(s) protected
記錄一下如何解決的吧。
一
字面意思,flash寫保護了。用的開發(fā)板上的flash是MX25L25645G,先看手冊status register。
如圖保護是bit5到bit0。
讀一下該寄存器值,時序和手冊一致:
發(fā)現(xiàn)全是1
再看一下修改寄存器的流程還挺多的
反正跟著流程圖操作就行了,給status register改成0就可以了。最后讀出驗證下有無更改成功
這時候再打開另一個vivado固化就可以了控制臺打印出Flash programming completed successfully。重新上電后程序也運行了。
二
用的是7系列開發(fā)板,所以代碼要用到的STARTUPE2原語,u系列是STARTUPE3,用法如下。
STARTUPE2 #(
.PROG_USR(“FALSE”), // Activate program event security feature. Requires encrypted bitstreams.
.SIM_CCLK_FREQ(10.0) // Set the Configuration Clock Frequency(ns) for simulation.
)
STARTUPE2_inst(
.CFGCLK ( ), // 1-bit output: Configuration main clock output
.CFGMCLK ( ), // 1-bit output: Configuration internal oscillator clock output
.EOS ( ), // 1-bit output: Active high output signal indicating the End Of Startup.
.PREQ ( ), // 1-bit output: PROGRAM request to fabric output
.CLK (1’b0 ), // 1-bit input: User start-up clock input
.GSR (1’b0 ), // 1-bit input: Global Set/Reset input (GSR cannot be used for the port name)
.GTS (1’b0 ), // 1-bit input: Global 3-state input (GTS cannot be used for the port name)
.KEYCLEARB (1’b0 ), // 1-bit input: Clear AES Decrypter Key input from Battery-Backed RAM (BBRAM)
.PACK (1’b0 ), // 1-bit input: PROGRAM acknowledge input
.USRCCLKO (sclk ), // 1-bit input: User CCLK input
// For Zynq-7000 devices, this input must be tied to GND
.USRCCLKTS (1’b0 ), // 1-bit input: User CCLK 3-state enable input
// For Zynq-7000 devices, this input must be tied to VCC
.USRDONEO (1’b0 ), // 1-bit input: User DONE pin output control
.USRDONETS (1’b0 ) // 1-bit input: User DONE 3-state enable output
);
然后cs_n,mosi,miso接到專用接口去就可以了。文章來源:http://www.zghlxwxcb.cn/news/detail-714556.html
總結(jié)
用的SDK燒錄bit文件到flash出現(xiàn)的問題,莫名其妙有點太坑了文章來源地址http://www.zghlxwxcb.cn/news/detail-714556.html
到了這里,關(guān)于關(guān)于xilinx fpga flash燒錄失敗報錯cannot set write enable bit or block(s) protected的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!