This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux support to access OMAP-L138 SOM Power Measure chips

Other Parts Discussed in Thread: OMAP-L138

Hi,

We are trying to determine the power consumption of the OMAP-L138 SOM board in the LogicPD EVM development kit.

Now we notice that in the SOM board there are 7 INA219AIDCNR chips that you can use to measure power. I'd like to know if there's already an available application/driver in the DVSDK that allows you to read the data from these chips?

 

Please advise.

 

Best Regards,

Grant

  • Just an update on this question, now I've started writing a application that will try to access the INA219AIDCNR chips through the I2C bus.

    I am able to open the I2C device node, but when I issue an IOCTL request (ioctl(fd, I2C_SLAVE_FORCE, 0x41)) I always get an EINVAL return code.

    I've looked ath the i2c-dev.c in the kernel->drivers directory and it does not make sense why it should return an EINVAL code.


    Here's the code that I wrote:

    int main(void)
    {
        int fd;
        char buff[10];

        if(fd = open("/dev/i2c-1", O_RDWR) < 0)
        {
            printf("Error opening I2C bus\n");
            return 1;
        }

        if(ioctl(fd, I2C_SLAVE_FORCE, 0x41) < 0)
        {   
            printf("Error setting I2C address\n");
            switch(errno)
            {
                case EBADF:
                    printf("d is not a valid descriptor\n");
                    break;
                case EFAULT:
                    printf("argp references an inaccessible memory area\n");
                    break;           
                case EINVAL:
                    printf("Request or argp is not valid\n");
                    break;
                case ENOTTY:
                    printf("d is not associated with a character special device\n");
                    break;
                default:
                    printf("Error setting I2C address\n");
                    break;
            }
            close(fd);
            return 1;
        }

        return 0;

    }

  • Update:

    I realize that the INA219AIDCNR ICs in the SOM board does not have any SW drivers for it.

    I'm currently looking if I can enable the driver in .config.

  •  

    Hi Grant,

    may be this does not apply to your case, but in mine the problem is described in E0013 on  OMAP-L138 SOM-M1 Errata.

    On my SOM I cannot access them with i2c-tools (i2cdump).

    Hope it helps,

    A.

  • As of PSP 03.20.00.00.14 the SOM Power ICs don't have device drivers to support them.