Skip to content

K64F Fails to read I2C EEPROM  #17

@maclobdell

Description

@maclobdell

After fixing the other unrelated issue: #16

The I2C EEPROM tests fail for K64F.

+--------------+---------------+---------------+------------------------------------+--------+--------+--------+--------------------+
| target       | platform_name | test suite    | test case                          | passed | failed | result | elapsed_time (sec) |
+--------------+---------------+---------------+------------------------------------+--------+--------+--------+--------------------+
| K64F-GCC_ARM | K64F          | tests-api-i2c | I2C -  EEProm WR 10  Bytes         | 0      | 3      | FAIL   | 0.5                |
| K64F-GCC_ARM | K64F          | tests-api-i2c | I2C -  EEProm WR 100 Bytes         | 0      | 1      | FAIL   | 0.8                |
| K64F-GCC_ARM | K64F          | tests-api-i2c | I2C -  EEProm WR 2 Bytes           | 0      | 3      | FAIL   | 0.47               |
| K64F-GCC_ARM | K64F          | tests-api-i2c | I2C -  EEProm WR Single Byte       | 0      | 2      | FAIL   | 0.31               |
| K64F-GCC_ARM | K64F          | tests-api-i2c | I2C -  Instantiation of I2C Object | 1      | 0      | OK     | 0.06               |
| K64F-GCC_ARM | K64F          | tests-api-i2c | I2C -  LM75B Temperature Read      | 1      | 0      | OK     | 0.12               |
+--------------+---------------+---------------+------------------------------------+--------+--------+--------+--------------------+
mbedgt: test case results: 4 FAIL / 2 OK

After the I2CEeprom library does a write to the EEPROM, it does a sequence of 0-byte writes every 1ms until it gets a ACK indicating the write finished on the EEPROM and it is ready to read. After it gets an Ack, then the read should happen.

But on the K64F the read doesn’t happen.

It seems that, if a 0-byte write cycle results in an Ack, there is no stop condition afterwards, and the next write cycle that is requested results in Bus Busy error.

I think that, for compatibility, the K64F hal implementation/driver needs to ensure that 0-byte write sequences (or all write sequences that are finished?), are followed by stop condition to release the bus.

@mmahadevan108

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions