11-29-2018 08:31 PM
I have programmed SPI Flash (M25P64) with .mcs using impact
Now my application requires to read that flash contents and do some manipulation over it.
am doing it by sending the read instruction (0x03 followed by 24-bit sector address). but the contents read are in different format
In the first page of first sector, there resides configuration data and it as follows:
:10000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00
:10001000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0
:10002000000000BB11220044FFFFFFFFFFFFFFFFA6
:10003000AA995566200000003003E0010000000B83
:10004000300080010000001220000000300220017A
:1000500000000000300200010000000030008001BC
:1000600000000000200000003000800100000007B8
:1000700020000000200000003002600100000000AD
:100080003001200102003FE53001C0010000000006
:10009000300180010364709330008001000000098A
:1000A000200000003000C001000004013000A00169
:1000B000000005013000C001000000003003000115
:1000C00000000000200000002000000020000000D0
:1000D00020000000200000002000000020000000A0
:1000E00020000000300020010000000030008001EE
:1000F000000000012000000030004000500B7A7822
data highlighted in green are the actual contents
when I read this from FPGA, the data that comes from MISO of Flash is as follows
Dummy Bite(mostly 0x00), 0xFF(32 bytes), 00, 00, BB, 00, 22, 11, 44, 00, 0xFF(8 bytes), 99, AA, 66, 55, 00, 20 ..........
where it has to be actually read like this:
0xFF(32 bytes), 00, 00, 00, BB, 11, 22, 44, 00, 0xFF(8 bytes), AA, 99, 55, 66......
----------------------------------------------------------------------------------------------------------------------------
*************************************************************************************************************
and even I tried writing some fixed value to some sector through impact using non-configuration data file option:
suppose in last sector I wrote:
0x7E5FE192BEAEF6F6EAA85F6D56CE413A
It has been read as foolows:
Dummy Bite(0x08), 5F, 7E, 92, E1, AE, BE, F6, F6, A8, EA, 6D, 5F, CE, 56, 3A, 41
on MISO:
00001000 01011111 01111110 10010010 11100001 10101110 10111110 11110110 11110110 10101000..........
where as the expected one is:
7E, 5F, E1, 92, BE, AE, F6, F6, EA, A8, 5F, 6D, 56, CE, 41, 3A
on MISO:
01111110 01011111 11100001 10010010 10111110 10101110 11110110 11110110 11101010 10101000......
--------------------------------------------------------------------------------------------------------------------------
Actually it has been read in the required format but in one particular hardware, its been read wrongly thats in different format as i mentioned.To read the data in the required format, is there any setting s to be changed or any hardware modification to be done.
Looking for the solution asap.
11-30-2018 01:49 PM
12-03-2018 12:37 AM
You can access configuration SPI Flash using STARTUP3 primitive (for ultrascale FPGAs) after FPGA configuration.
Check XAPP1280 (v1.1) for more details.