[prev in list] [next in list] [prev in thread] [next in thread] 

List:       libftdi
Subject:    ftdi_eeprom_build issue with TYPE_230X
From:       Robert Cox <Robert.cox () novatechweb ! com>
Date:       2016-12-13 21:46:20
Message-ID: CY4PR07MB2968C013B895E616DEB6AA9B8F9B0 () CY4PR07MB2968 ! namprd07 ! prod ! outlook ! com
[Download RAW message or body]

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@developer.intra2net.com   


[Attachment #3 (text/html)]

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} \
--></style> </head>
<body dir="ltr">
<div id="divtagdefaultwrapper" \
style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" \
dir="ltr"> <p>I am trying to clear the USE_SERIAL bit on a FTDI 230X, but I am having \
issues doing this.&nbsp;</p> <p></p>
<p style="font-family: Calibri, Arial, Helvetica, sans-serif, &quot;Apple Color \
Emoji&quot;, &quot;Segoe UI Emoji&quot;, NotoColorEmoji, &quot;Segoe UI Symbol&quot;, \
&quot;Android Emoji&quot;, EmojiSymbols; font-size: 16px;"> I have verified that my \
ftdi-&gt;eeprom-&gt;use_serial is&nbsp;cleared&nbsp;before calling the eeprom_build. \
After writing the buf out I find that it has not been changed though.</p> <div><br>
</div>
<div>I have looked into the code and see the following:</div>
<div>Lines 2882-2888 which do what I would expect to be done for this parameter</div>
<div>
<div>if (ftdi-&gt;type &gt; TYPE_AM) /* use_serial not used in AM devices */</div>
<div>{</div>
<div>if (eeprom-&gt;use_serial)</div>
<div>&nbsp; &nbsp;output[0x0A] |= USE_SERIAL_NUM;</div>
<div>else</div>
<div>&nbsp; &nbsp;output[0x0A] &amp;= ~USE_SERIAL_NUM;</div>
<div>}</div>
<div>But then in the switch (ftdi-&gt;type) for the case TYPE_230X the value for \
output[0x0A] is then hard coded to 0x08 (line 3184&nbsp;<span>output[0x0a] = 0x08; /* \
Enable USB Serial Number */</span>)</div> <div><br>
</div>
<div>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.</div> <div><br>
</div>
</div>
<div>It looks like this was put in when the partial support for the FT230X was \
added.</div> <div><br>
</div>
<div>I would correct this myself but I do not have the needed steps to do it or what \
software to use.</div> <p></p>
<p><span><span><span></span></span></span></p>
</div>

<br><hr><p><b>libftdi</b>&nbsp;-&nbsp;see <a \
href="http://www.intra2net.com/en/developer/libftdi">http://www.intra2net.com/en/developer/libftdi</a> \
for details.<br> To unsubscribe send a mail to <a \
href="mailto:libftdi+unsubscribe@developer.intra2net.com">libftdi+unsubscribe@developer.intra2net.com</a></p>


<br></body>
</html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic