I2C data transferring

fenix710
fenix710 New Member Posts: 1
edited February 2022 in UP Board Windows

Hello,
I have an issue by using I2C in Windows 10 (NOT IoT). I have connected wires to PIN 3 and 5 on UP board 40 HAT pins. I used to use Linux debian and i2cdetect -y -r 1 showed that there is one I2C device 0x3C. So now i Installed Windows 10 and tried to run as follows:
EApiLibInitialize();
rc = EApiI2CProbeDevice(0, 0x3c); rc - EAPI_STATUS_ERROR (0xFFFFF0FF)
rc = EApiI2CProbeDevice(1, 0x3c); rc - EAPI_STATUS_UNSUPPORTED(FFFFFCFF)

By the way I also tried to use EApiGPIOSetLevel function and it works perfect!

Please help me to find my I2C device in Windows 10.

BIOS version R1.7
UP framework service 17.59.46.759 (8/27/2019)

Answers

  • JunYing
    JunYing New Member, Moderator, AAEON Posts: 8 admin

    Hi @fenix710 ,

    On Windows ,I2C Bus definie is different from linux,you can reference below setting to work.
    For PIN3,PIN5 , I2C BUS is definie 3 - > EApiI2CProbeDevice(3, 0x3c);
    For PIN27,PIN28 ,I2C BUS is definie 0 - > EApiI2CProbeDevice(0, 0x3c);

This discussion has been closed.
Privacy Policy