This is the mail archive of the mailing list for the eCos project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug 1001397] I2C driver for Kinetic microcontrollers

Please do not reply to this email. Use the web interface provided at:

--- Comment #39 from Mike Jones <> 2013-01-06 05:46:55 GMT ---
I am having trouble slowing down the bus speed.

This is my code for write byte, but it is clocking at over 1Mhz, and my devices
only go up to 400Khz.

Is there something else I need to do?

void smbus_write_byte(uint8_t address, uint8_t command, uint8_t data)
    cyg_uint8 buffer[2];
    cyg_i2c_device device = {                        \
            .i2c_bus        = &hal_kinetis_i2c0_bus, \
            .i2c_address    = address,               \
            .i2c_flags      = 0,                     \
            .i2c_delay      = 10000                  \

    buffer[0] = command;
    buffer[1] = data;

    if(!cyg_i2c_transaction_tx(&device, true, &buffer[0], 2, false)) {
        diag_printf("Read: fail TX.\n");


Configure bugmail:
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]