libftdi Archives
|
From: | Rodrigo Rosa <rodrigorosa.lg@xxxxxxxxx> |
---|---|
To: | libftdi@xxxxxxxxxxxxxxxxxxxxxxx |
Date: | Mon, 7 Feb 2011 16:32:53 -0800 |
Hello, I'm trying to use a ft2232 with MPSSE and JTAG. I managed to get the device to respond to 0xAA (bogus code) with [0xFA 0xAA], but everytime I try to read I get 0xff. any ideas?
Example: unsigned char output_buff[1024]; unsigned char input_buff[1024]; uint numBytesToSend = 0; uint numBytesToRead = 0;
uint numBytesSent = 0; uint numBytesRead = 0; numBytesToSend = 0; output_buff[numBytesToSend++]=0x1A; output_buff[numBytesToSend++]=0x01;
output_buff[numBytesToSend++]=0xAA; numBytesSent = ftdi_write_data(&ftdic, output_buff, numBytesToSend); //read numBytesToRead = numBytesSent;
numBytesToSend = 0; output_buff[numBytesToSend++]=0x2E; output_buff[numBytesToSend++]=0x01; numBytesSent = ftdi_write_data(&ftdic, output_buff, numBytesToSend);
numBytesToRead = numBytesSent; input_buff[0]=0x00;input_buff[1]=0x00;input_buff[2]=0x00; numBytesRead = ftdi_read_data(&ftdic, input_buff, numBytesToRead); My objective is to be able to use the ft2232 to flash another device via JTAG. I've based my implementation on ioftdi from xc3sprog. Thanks! --
Rodrigo. libftdi - see http://www.intra2net.com/en/developer/libftdi for details. |
Current Thread |
---|
|