6 years, 6 months ago.

Missing one of two channel I2C function on nRF51822

nRf51 I2C class can support 2 channels and works well both two line simultaneous at least mbed rev.114.
I changed to mbed-os then I'm facing a trouble.
It seems 2 channel I2C line can not work correctly.
I made a simple test program as flows(no connection I2C devices).

// mbed Rev.114  Feb.16th,2016
// mbed-os-5.6.3 Oct.24th,2017
#include "mbed.h"
DigitalOut  SensorPWR(P0_19,1); // my hardware config.
I2C         i2c0(P0_23, P0_21);
I2C         i2c1(P0_6, P0_2);
int main(void){
    char cmd[2];
    while(true){
        cmd[0] = 0xaa;
        i2c0.write(0x15, cmd, 1);
        wait(0.1f);
        i2c1.write(0x1a, cmd, 1);
        wait(0.1f);
    }
}

On mbed Rev.114, good as below (Remarks: I2C line, both SDA & SCL are open).
Actually my own program can work with RTC, Pressure sensor, temperature sensor and so on.
/media/uploads/kenjiArai/i2c_ok2.png

On mbed-os-5.6.3, one channel is idle(hardware is same and only program was changed from mbed to mbed-os).
/media/uploads/kenjiArai/i2c_ng2.png

I would like to run same program on mbed-os.
Does someone can fix this trouble?

Question relating to:

Bluetooth Low Energy (a.k.a Bluetooth LE, BTLE, Bluetooth Smart)
Be the first to answer this question.