Hello Newell, On 11/08/2010 04:27 AM, Newell Jensen wrote: >>>> buf0 = chr(ftdi.TCK_DIVISOR) # command "set divisor" >>>> buf1 = chr(div & 0xFF) # NOTE: I have also tried using chr((div >> 0) & >>>> 0xFF) as well >>>> buf2 = chr(((div >> 8) & 0xFF)) >>>> buf = buf0 + buf1 + buf2 >>>> ftdi.ftdi_write_data(ftdic, buf, 3) > -110 > > So that is one issue I run into. That is, where the disabling of the 5X > works but the other clock divisor setting doesn't. Something interesting is > if I do the above without disabling the 5X, then it works. Any ideas on this?
Hmm. No idea right now. Could you come up with a small C example code to demonstrate the issue? > 2. The second issue I run into is setting the loopback after setting the > clock divisor above (so I am not disabling the 5X so that I proceed on in my > script to the loopback setting). When I go to disable or enable the loopback > I get usb bulk write fail from the command below: > >>>> ftdi.ftdi_write_data(ftdic, chr(ftdi.LOOPBACK_START), 1) > > > Any help would be greatly appreciated as at this point I am just scratching > my head. Never used that either. Though I'm not sure if the ftdi.ftdi_write_data is the correct function when using the python wrapper: ftdi_write_data() calls usb_bulk_write(). Configuration changes inside libftdi are normally communicated via usb_control_msg() and also feature different "requests". Not sure how you emulated that via the python wrapper?? Cheers, Thomas -- libftdi - see http://www.intra2net.com/en/developer/libftdi for details. To unsubscribe send a mail to [email protected]
