fx2lp eeprom speed

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
gean_3054931
Level 5
Level 5
10 likes given 5 likes given First like received

Hello,

i am using c2 load eeprom booting for fx2lp in my project.defaulty i2c speed is 100khz.i have red  that it can be 400khz speed by setting the EEPROM Configuration Byte.if 400khz bo bit is one,then it will be 400khz,if its is 0,its 100khz.

but how to make changes ?and where i will find this bit in the fx2lp firmware?let me know.

b7      b6            b5  b4   b3  b2  b1      b0

0    DISCON       0    0     0    0    0    400KHZ

regards,

0 Likes
1 Solution
SrinathS_16
Moderator
Moderator
Moderator
1000 replies posted 750 replies posted 500 replies posted

Hello Geethanjali,

The EEPROM contents has got the 8th byte as the 'Configuration Byte'. This byte has the DISCON and 400kHz bits as you had mentioned.

The I2C frequency would be changed to 400kHz when the bit0 of the Configuration Byte is set. This can be set using the Hex2Bix utility that comes with the FX2LP DVK.

In order to generate the IIC file using the Keil Project with the bit0 of the configuration byte set, kindly, follow the steps below.

- Right click on the <Target Name> in the project window and choose 'Options for Target <Target Name>'.

- From the dialog box that appears, open the 'Output' tab.

- In the 'Run User Program #1' box, enter the below statement.

hex2bix -i -f 0xC2 -c 0x01 -o bulkloop.iic bulkloop.hex

After building the target, the IIC file will be generated. The contents of the IIC file can be checked to confirm if the Configuration Byte is set tto 0x01.

Best regards,

Srinath S

View solution in original post

1 Reply
SrinathS_16
Moderator
Moderator
Moderator
1000 replies posted 750 replies posted 500 replies posted

Hello Geethanjali,

The EEPROM contents has got the 8th byte as the 'Configuration Byte'. This byte has the DISCON and 400kHz bits as you had mentioned.

The I2C frequency would be changed to 400kHz when the bit0 of the Configuration Byte is set. This can be set using the Hex2Bix utility that comes with the FX2LP DVK.

In order to generate the IIC file using the Keil Project with the bit0 of the configuration byte set, kindly, follow the steps below.

- Right click on the <Target Name> in the project window and choose 'Options for Target <Target Name>'.

- From the dialog box that appears, open the 'Output' tab.

- In the 'Run User Program #1' box, enter the below statement.

hex2bix -i -f 0xC2 -c 0x01 -o bulkloop.iic bulkloop.hex

After building the target, the IIC file will be generated. The contents of the IIC file can be checked to confirm if the Configuration Byte is set tto 0x01.

Best regards,

Srinath S