我的altera epcs6E22 用epcs M25p16.
我想加密我的系统, M25P16 有一个唯一的ID, 如果可以读取,我就可以加密了。
可我不知道怎么在FPGA 里读取。
datasheet 是这么说的:
Instructions M25P16
6.3 Read Identification (RDID)
The Read Identification (RDID) instruction allows to read the device identification data:
„ Manufacturer identification (1 byte)
„ Device identification (2 bytes)
„ A Unique ID code (UID) (17 bytes, of which 16 available upon customer request).
The manufacturer identification is assigned by JEDEC, and has the value 20h for Numonyx.
The device identification is assigned by the device manufacturer, and indicates the memory
type in the first byte (20h), and the memory capacity of the device in the second byte (15h).
The UID contains the length of the following data in the first byte (set to 10h), and 16 bytes
of the optional Customized Factory Data (CFD) content. The CFD bytes are read-only and
can be programmed with customers data upon their request. If the customers do not make
requests, the devices are shipped with all the CFD bytes programmed to zero (00h).
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
楼主是读spi里的id, altera库里的那个epcs_read_device_id读取的是epcs的id,该id仅8位,表示的是类型,比如epcs16里面id都是0x14。用做加密显然不可能,另外楼上的兄弟在函数里进入死循环大概是base不对,将句柄转换为epcs_flash_dev*类型,参数->silicon_id即是要读的id.
一周热门 更多>