eeprom->chip problem

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

eeprom->chip problem

Sniegowski, Dean
Hello I'm using a 4232H device with a 93x56 eeprom.

I was having a problem writing to the eeprom. My manufacturer, product, and serial strings are written to the wrong location.

My code looks like:

ftdi_eeprom_initdefaults(ftdi, "manufact1", "product2", "serial3" );
ftdi->eeprom->product_id = 0x6011;
ftdi->eeprom->vendor_id = 0x0403;
ftdi_eeprom_build(ftdi);
ftdi_write_eeprom(ftdi);


The problem is ftdi_eeprom_initdefaults zeroizes the ftdi->eeprom struct. This includes ftdi->eeprom->chip.

When ftdi_eeprom_build is called,  

 2581     if (eeprom->size == -1)
 2582     {
 2583         if ((eeprom->chip == 0x56) || (eeprom->chip == 0x66))
 2584             eeprom->size = 0x100;
 2585         else
 2586             eeprom->size = 0x80;
 2587     }

eeprom size is incorrect set to  0x80 instead to 0x100


It seems like ftdi_eeprom_initdefaults should set the eeprom->chip like ftdi_erase_eeprom() does it.

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]

Loading...