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.

TM4C123 and SENSHUB

Other Parts Discussed in Thread: TMP006

I recently purchased the SENSHUBPACK-123G and then downloaded SW-TM4C-2.0.1.11577.exe and unpacked the contents.  I then ran make from the root of the directory, attached the senshub to the launchpad, plugged in the USB, pulled up a terminal and flashed the device with the compdcm_mpu9150 example.

This is what the terminal shows:

MPU9150 Raw Example

Error: 1, File: compdcm_mpu9150.c, Line: 455
See I2C status definitions in sensorlib\i2cm_drv.h

In looking at sensorlib/i2cm_drv.h, I'm showing that the Error: 1 is the result of a I2CM_STATUS_ADDR_NACK.  Is there a reason that I would be getting this?  This device is fresh out of the box, and the software was downloaded off the website only moments ago.  Make is compiling it using arm-none-eabi-gcc.

  • I receive the same error (Error: 1) when I attempt to use humidity_sht21, light_isl29023, or temperature_tmp006.  When I attempt pressure_bmp180 though, the device appears to hang, and the only visual indicator is a solid blue LED.  Is it possible that the device is bad?

  • The "hello" example works fine, which seems to cover most of the same functionality, aside from I2C and interrupts.

  • Oddly, flashing the device with the hello example and then flashing it with the compdcm_mpu9150 again seemed to resolve the issue.

  • Okay, this is happening again.  This time though, flashing it with the 'hello' didn't resolve the issue.  At this point, I cannot get the device to respond with anything other than Error: 1.

    Before this happened, the numbers on the output froze (the light was still blinking) and I reset it, causing the output to display as usual, except there weren't any numbers.  I then disconnected the Launchpad and re-connected it, and it's now displaying the error again.

    I'm not sure how I am supposed to develop on this board with these inconsistencies.  I haven't made any changes, this is the code that TI has provided.

  • Feel (and sorry for) your pain.  The I2C issue you report has impacted others, iirc.  Might the search box (atop the left edge - this forum) reveal others methods - and with luck - how they've succeeded?  (if in fact - that success occurred)

    Our group uses paid IAR - not the IDE nor flash programmers here - IAR simply works!  It may serve you to further detail just how you "flash" your MCU.  You were victorious once - leads to the belief that your bulk methods are correct - perhaps a single detail is missed - or your I2C signals are at/around some, "ragged edge!"  Our group never/ever "believes" in "internal WPU I2C pull-up Rs" - instead we always employ 10K or less external Rs for both SDA & SCL. 

    If indeed you've both a "mother board" and "separate, sensor board" - make/break the board to board connection several times.  Difficulty you describe may well prove, "oxidized contacts on critical, I2C pins."

    You may wish to scope both I2C lines - observe signal quality and determine what's happening just prior to that defeating "NAK."   And - if you're using USB cable as sole power source - is it adequate for the "combined board" - power task?  Devil loves/lurks in such gory detail... 

    Wish I had more - bon chance, mon ami...

  • Hello Robert,

    I just plugged in the EK-TM4C123 and SENSHUB and all examples are working as expected. As cb1_mobile mentioned, can you scope the I2C lines?

    Also did you make any changes to either of the boards? It would be useful, if you can send a snapshot of the two boards so that I can do a diff compare.

    Regards

    Amit

  • I modified defined as I suggested, however mistake me marks, any option for this? :(

  • Hi,

        The first referenced error means that TMP006AppErrorHander() have been defined at two or more C files. Also, possible that you have CCS settings that is causing this.

        When you import the temperature_tmp006 example program to CCS, it should compile without errors. Did you do anything that is unusual?

    - kel