libftdi Archives

Subject: Configuring CBUSX_CLK24

From: Yegor Yefremov <yegorslists@xxxxxxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Tue, 18 Apr 2017 11:47:50 +0200
I'm configuring FTX ftdi.CBUS_FUNCTION_0 to ftdi.CBUSX_CLK24 in Linux
(ARM machine). After this ttyUSB0 gets disconnected, I can either
rebind it or reload the FTDI drive. Everything as expected. The
problem is, that I get 24MHz output only if I really reboot my ARM
machine.

How can I activate 24MHz without rebooting?

My code snippet for programming 24MHz:

if ftdi.set_eeprom_value(context, ftdi.CBUS_FUNCTION_0, ftdi.CBUSX_CLK24) != 0:
    print("Failed to set CBUS_FUNCTION_0")
    return False

# prepare EEPROM buffer for writing
if ftdi.eeprom_build(context) < 0:
    print("Failed to build EEPROM")
    return False

# finally write EEPROM
if ftdi.write_eeprom(context) != 0:
    print("Failed to write EEPROM")
    return False

# close FTDI device
if ftdi.usb_close(context) != 0:
    print("Failed to close FTDI device")
    return False

Regards,
Yegor

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread