Maggyrock
Maggyrock

Reputation: 11

code to read device ID of MachXo2 with FTDI -JTAG

In my project I am working on MachX02 programming with FTDI master using JTAG functionality. I am trying to read device ID of MachX02, but not working, here is my sample code to read device ID of MachX02:

cmd_buffer[0] = 0xE0;
cmd_buffer[1] = (byte)((operand & 0xFF0000) >> 16);
cmd_buffer[2] = (byte)((operand & 0x00FF00) >> 8);
cmd_buffer[3] = (byte)(operand & 0x0000FF);
JTAG_WriteRead(fthandle, false, 32, cmd_buffer, 4, m_readbuffer, ref operand, RUN_TEST_IDLE_STATE);

Where I went wrong could not able to identify, for MachX02 before sending device ID opcode, do I need to send any another opcode? Please help to overcome this problem, thanks in advance.

Upvotes: 1

Views: 515

Answers (0)

Related Questions