On Wed, Jun 27, 2012 at 5:43 PM, Vivien Giraud <[email protected]> wrote: > On 27/06/2012 11:18, Xiaofan Chen wrote: >> >> On Wed, Jun 27, 2012 at 5:02 PM, Vivien Giraud<[email protected]> >> wrote: >>> >>> Hello, >>> I'm experiencing a problem yesterday with ft2232.c. >>> When I connect my board openocd say that I can't have a clock higher >>> than 6000Khz (quite strange because I have a ft2232 chip) even if I set >>> it to 0 or 30000. >> >> Which FT2232 chip are you using? > > That's a FT2232HL but I don't understand why when I make a 'lsusb' I've > receive this : > > Bus 001 Device 039: ID 0403:6010 Future Technology Devices International, > Ltd FT2232C Dual USB-UART/FIFO IC > That's not a FT2232C this is a HL
Hmm, this is not good, which means that your device use the default FTDI VID/PID which is 0403:6010. Please try to program the EEPROM with a proper VID/PID. >>> I've change something in this c file : >>> >>> static unsigned ft2232_max_tck = FTDI_2232H_4232H_MAX_TCK; >>> //static unsigned ft2232_max_tck = FTDI_2232C_MAX_TCK; >>> >>> And now it's work well (I've got 30000Khz without problem ;) >>> Anyone have the same problem ? >> >> Which version of OpenOCD are you using? Supposedly the >> code can detect the chips type and then change the above variable. >> >> http://openocd.git.sourceforge.net/git/gitweb.cgi?p=openocd/openocd;a=blob;f=src/jtag/drivers/ft2232.c;hb=HEAD >> >> 631 /** >> 632 * Enable/disable the clk divide by 5 of the 60MHz master clock. >> 633 * This result in a JTAG clock speed range of 91.553Hz-6MHz >> 634 * respective 457.763Hz-30MHz. >> 635 */ >> 636 static int ft2232h_ft4232h_clk_divide_by_5(bool enable) >> 637 { >> 638 uint32_t bytes_written; >> 639 uint8_t buf = enable ? 0x8b : 0x8a; >> 640 >> 641 if (ft2232_write(&buf, sizeof(buf),&bytes_written) != >> ERROR_OK) { >> >> 642 LOG_ERROR("couldn't write command to %s clk divide by >> 5" >> 643 , enable ? "enable" : "disable"); >> 644 return ERROR_JTAG_INIT_FAILED; >> 645 } >> 646 ft2232_max_tck = enable ? FTDI_2232C_MAX_TCK : >> FTDI_2232H_4232H_MAX_TCK; >> 647 LOG_INFO("max TCK change to: %u kHz", ft2232_max_tck); >> 648 >> 649 return ERROR_OK; >> 650 } >> > This is a git up-to-date 0.6.0-dev. > > PS: I have commit a patch yesterday (with git commit -a) is it the good > command ? Where can I see if someone have accepted it ? Did you use the Gerrit? http://openocd.git.sourceforge.net/git/gitweb.cgi?p=openocd/openocd;a=blob;f=HACKING;hb=HEAD -- Xiaofan ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
