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.

Melexis MLX90614 on CC3200 launchXL Launchpad

Other Parts Discussed in Thread: CC3200

Hi everyone,

I'm quite new to the CC3200 and I'm trying to get MLX90614 (IR temperature sensor) working, but no success so far. Currently I'm using one of the SDK sample apps: http://processors.wiki.ti.com/index.php/CC32xx_I2C_Application 

cmd#readreg 0x5A 0x07 2

which is meant to read 2 bytes from 0x07 register of 0x5A device, I've got this:

Error in processing command

I have tested it in couple configurations:

- built-in sensors connected (J2 & J3 closed, MLX90614 SCL and SDA to P01 & P02 without external pull-ups)

- built-in sensors disconnected (J2 & J3 open, MLX90614 SCL and SDA to P01 & P02 with external pull-ups)

The whole UART output looks like this:

Command Usage 

------------- 

write <dev_addr> <wrlen> <<byte0> [<byte1> ... ]> <stop>

. - Write data to the specified i2c device

read  <dev_addr> <rdlen> 

. - Read data frpm the specified i2c device

writereg <dev_addr> <reg_offset> <wrlen> <<byte0> [<byte1> ... ]> 

. - Write data to the specified register of the i2c device

readreg <dev_addr> <reg_offset> <rdlen> 

. - Read data from the specified register of the i2c device


Parameters 

---------- 

dev_addr - slave address of the i2c device, a hex value preceeded by '0x'

reg_offset - register address in the i2c device, a hex value preceeded by '0x'

wrlen - number of bytes to be written, a decimal value 

rdlen - number of bytes to be read, a decimal value 

bytex - value of the data to be written, a hex value preceeded by '0x'

stop - number of stop bits, 0 or 1

----------------------------------------------------------------------------- 



cmd#



cmd#readreg 0x5A 0x07 2

Error in processing command

Shouldn't it work like that in either or both of those? Or am I forgetting something important?

I've even tested MLX90614 sensor with Arduino to check if everything's fine with it, and it works perfectly. 

documents:

cdn-shop.adafruit.com/.../MLX90614.pdf

  • CC3200 Lauchpad has on-board TMP006 Infrared thermopile Temp sensor. The SDK out of box example, uses this sensor. Are you connecting the MLX90614, sensor externally, to the Launchpad?
  • Thanks for reply. My target application requires an external temperature sensor, and its specifically needs to be MLX90614. So yes, I am connecting it externally.

    Since both sensors work on I2C, I used the same example app mentioned above (the I2C example) to test the TMP006 and it responds fine, so I'm pretty sure there is something about the MLX90614.

    Regards
  • Ok, I've found out what was the problem. The example sets I2C  to communicate in fast mode by default and for the MLX90614 it needs to be standard:

     //I2C_IF_Open(I2C_MASTER_MODE_FST);
        I2C_IF_Open(I2C_MASTER_MODE_STD);

    Next thing is to make sure is that I2C_IF_Write() function in ProcessReadRegCommand() has number of stop bits set to 0: 

        // Write the register address to be read from.
        // Stop bit implicitly assumed to be 0.
        //
        RET_IF_ERR(I2C_IF_Write(ucDevAddr,&ucRegOffset,1,0));

    Otherwise the sensor will return only 0xff values.

    The desired result looks like that:

     

    cmd#readreg 0x5A 0x07 3
    
    I2C Read From address complete
    
    Read contents
    
     0x6,  0x3a,  0xde, 
    

  • Glad, you found the issue.. Good luck.