Closed rei-vilo closed 9 years ago
I don't have a logic analyser at hand to check the signals and speed.
Any other beta-testers luckier than me?
By default, speed is set to 400 kHz by true
in MAP_I2CMasterInitExpClk(I2C_BASE, F_CPU, true)
at Wire.cpp line 45.
void TwoWire::begin(void)
{
MAP_PRCMPeripheralClkEnable(PRCM_I2CA0, PRCM_RUN_MODE_CLK);
MAP_PinTypeI2C(PIN_01, PIN_MODE_1);
MAP_PinTypeI2C(PIN_02, PIN_MODE_1);
MAP_PRCMPeripheralReset(PRCM_I2CA0);
MAP_I2CMasterInitExpClk(I2C_BASE, F_CPU, true);
}
See 7.2.2.1 Standard and Fast Modes page 167 in CC3200 Technical Reference Manual (swru367a)
So I changed it for false
and I continue my explorations...
Even at slow speed 100 kHz, the I²C sensors of the SensorHub BoosterPack don't sent any answer: SHT21, BMP180, TMP006, ISL29023. Neither does the HMC6352.
Obviously, I've removed the J2 and J3 jumpers.
I just tried this with the Adafruit TMP006 and the example Sketch that comes with it: https://github.com/adafruit/Adafruit_TMP006
Make sure that you comment:
Adafruit_TMP006 tmp006;
and uncomment
Adafruit_TMP006 tmp006(0x41);
Sketch output
Adafruit TMP006 example
Object Temperature: 22.97*C
Die Temperature: 27.31*C
Object Temperature: 26.38*C
Die Temperature: 27.25*C
Object Temperature: 26.75*C
Die Temperature: 27.28*C
Object Temperature: 30.12*C
Die Temperature: 27.22*C
Object Temperature: 26.93*C
Die Temperature: 27.28*C
Object Temperature: 27.31*C
Die Temperature: 27.22*C
Object Temperature: 26.25*C
Die Temperature: 27.22*C
Object Temperature: 24.19*C
Die Temperature: 27.22*C
Object Temperature: 24.64*C
Die Temperature: 27.19*C
Object Temperature: 26.65*C
Die Temperature: 27.19*C
Object Temperature: 24.28*C
Die Temperature: 27.22*C
Object Temperature: 23.73*C
Die Temperature: 27.22*C
Object Temperature: 23.40*C
Die Temperature: 27.22*C
Object Temperature: 23.22*C
No luck!
dafruit TMP006 example mid = 0xFFFF did = 0xFFFF No sensor found
adafruit lib works for me too, without any modifications inside Wire lib (oryginal from 13b2) I tested too OLED ssd1306 (i2c) - works OK
Great to know.
@rei-vilo Can you check the voltage on the I2C lines? Wonder if something's wonky with yours...
I'll check back home next week where I've all my equipment.
I've done a clean build and install of Energia and I²C now reads both the built-in BMA222 and TMP006.
Other sensors tomorrow.
I just checked this again and with the BMA222 and TMP006. Both of them work for me. I also tested with all the sonsors on the sensorhub boosterpack. All of them work except the BMP180 which seems to be clock stretching and I don't think it is handled correctly in the Wire library for CC3200.
Note that the sensorhub boosterpack has the I2C pins on the legacy pins 14 and 15 whereas the CC3200 has them on the "new standard" pins 9 and 10. Simply blue wiring those pins on the bottom header makes it works.
For the TMP006 on the CC3200, the library from Adafruit works fine but not the library from the Educational BoosterPack MK-2.
On the CC3200, sketch freezes at this instruction being polled
uint8_t tmp006::ready(void)
{
if (CONVERSION_DONE & readRegister(TMP006_CONFIG_REG))
return 1;
else
return 0;
}
with
#define CONVERSION_DONE 0x0080
#define TMP006_CONFIG_REG 0x02
while the same sketch runs smoothly on the LM4F120 or TM4C123.
Any idea?
stalla & tiva connected to cc3200 TMP? or You check this with external TMP006?
CC3200 in http://www.ti.com/lit/ug/swru372/swru372.pdf (page9) have TMP008 ??, maybe is there some difference, maybe e.g. tmp008 do not have DATAREADY register bit? Your schemat in first post is from cc3200?
AdaFruit lib don't check this bit before reading data
Strange, as the schematics mention a TMP006 as illustrated in the first post.
There's a newly launched TMP007 (link) but looking for the TMP008 on TI website throws a 404 error.
This issue was related to #496.
Old I²C libraries weren't updated.
Is this still an issue then?
No, I just provide the explanation for the records.
Ok, thanks!
@reaper7 Could I please have your port of the ssd1306?
The example provided for the BMA222 works fine.
For the TMP006, there's no example provided.
Reuse the library and sketch from the Educational BoosterPack MK-2 and
ADR1_0_ADR0_1
instead ofADR1_0_ADR0_0
according to schematicsS0
forS0_
asS0
is already declared inEnergia.h
line 58.Unfortunately, results are strange.
Now, trying with other I²C sensors fails.
Both the HMC6352 and the SensorHub BoosterPack return no answer.