libftdi Archives

Subject: ftdi_eeprom_build issue with TYPE_230X

From: Robert Cox <Robert.cox@xxxxxxxxxxxxxxx>
To: "libftdi@xxxxxxxxxxxxxxxxxxxxxxx" <libftdi@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 13 Dec 2016 21:46:20 +0000

I am trying to clear the USE_SERIAL bit on a FTDI 230X, but I am having issues doing this. 

I have verified that my ftdi->eeprom->use_serial is cleared before calling the eeprom_build. After writing the buf out I find that it has not been changed though.


I have looked into the code and see the following:
Lines 2882-2888 which do what I would expect to be done for this parameter
if (ftdi->type > TYPE_AM) /* use_serial not used in AM devices */
{
if (eeprom->use_serial)
   output[0x0A] |= USE_SERIAL_NUM;
else
   output[0x0A] &= ~USE_SERIAL_NUM;
}
But then in the switch (ftdi->type) for the case TYPE_230X the value for output[0x0A] is then hard coded to 0x08 (line 3184 output[0x0a] = 0x08; /* Enable USB Serial Number */)

It looks like the line on 3184 does not need to be in the code at all with the other clause handling the needed bits by itself.

It looks like this was put in when the partial support for the FT230X was added.

I would correct this myself but I do not have the needed steps to do it or what software to use.



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


Current Thread
  • ftdi_eeprom_build issue with TYPE_230X, Robert Cox <=