spirilis 1,265 Posted September 13, 2014 Share Posted September 13, 2014 That's not a bug, it's a timeout in energia 13's new LPM code which tries to see if you have a working 32.768KHz XTAL or not. Sent from my Galaxy Note II with Tapatalk 4 Quote Link to post Share on other sites
janisalnis 1 Posted September 13, 2014 Share Posted September 13, 2014 Thanks for making Energia to support CC3200. I blog for Element14 Backyard Challenge http://www.element14.com/community/people/janisalnis/blog/2014/09/13/energia-is-out-there-for-cc3200 Onboard temperature sensor example did not work for me. Anyone can help? QuickTMP006.ino:17:20: fatal error: tmp006.h: No such file or directory Quote Link to post Share on other sites
igor 163 Posted September 13, 2014 Share Posted September 13, 2014 Onboard temperature sensor example did not work for me. Anyone can help? QuickTMP006.ino:17:20: fatal error: tmp006.h: No such file or directory Please note that the example you are trying to load is for a TMP006 infra-red temperature sensor, which is part of the Educational Boosterpack Mark 2. I do not believe that there is a TMP006 temperature sensor built in to the CC3200, so this probably is not an onboard sensor. [Edit: My memory was wrong, turns out it does have a TMP006] It looks like there is indeed an omission in the CC3200 section of energia. It could be that the TMP006 driver has not been tested or does not work with the CC3200 (and they neglected to remove the demo), or that the TMP006 driver was inadvertently omitted. If you want to read from the temperature sensor built in to the CC3200, if it works like the Stellaris/Tiva processors, then there would be a special ADC channel to read that sensor. (Don't know if there are demos that cover this specifically.) I did a little poking around and it looks like all the BP mark 2 examples which rely on libraries (Servo, LCD_, TMP006) do not work on CC3200 because the requisite libraries do not exist on that platform. I will submit an issue. janisalnis 1 Quote Link to post Share on other sites
lethaixuong 0 Posted September 14, 2014 Share Posted September 14, 2014 That's not a bug, it's a timeout in energia 13's new LPM code which tries to see if you have a working 32.768KHz XTAL or not. Sent from my Galaxy Note II with Tapatalk 4 So how can I disable this time out? Quote Link to post Share on other sites
spirilis 1,265 Posted September 14, 2014 Share Posted September 14, 2014 So how can I disable this time out?Install XT1 and it will shorten, otherwise you can't (well, find the code in wiring.c and modify if you want) Sent from my Galaxy Note II with Tapatalk 4 Quote Link to post Share on other sites
LiviuM 43 Posted September 14, 2014 Share Posted September 14, 2014 Hello all, I think I found a mistake in the CC3200 Launchpad pin map (pins_energia.h). In the file I have (Energia 0101E0013), the push-button 1 is defined as Pin 3 static const uint8_t PUSH1 = 3; but from the map on the energia.nu it should be on the Pin 4 static const uint8_t PUSH1 = 4; Regards,Liviu PS Sorry if this issue was already reported, I've found nothing on the github list. Quote Link to post Share on other sites
igor 163 Posted September 14, 2014 Share Posted September 14, 2014 So how can I disable this time out? Install XT1 and it will shorten, otherwise you can't (well, find the code in wiring.c and modify if you want) The function enableXtal() looks suspiciously like it may be what you want. At one of the calls to it it says. /* Attempt to enable the 32kHz XTAL */ Seems a little odd that this function is called twice for some parts. (if __MSP430_HAS_BC2__ is defined, it is called up near the top of initClocks(), and then it is called again down at the end of initClocks().) Not clear from the code why it needs to be called twice. enableXtal is not present in previous version of Energia. (I haven't tested it to be sure that it is the part you want, or to figure out how to bypass the timeout). Might be nice if there was a user configurable way to turn the check off. Quote Link to post Share on other sites
LiviuM 43 Posted September 14, 2014 Share Posted September 14, 2014 I think I found a mistake in the CC3200 Launchpad pin map (pins_energia.h).I was looking a little more and I think the mistake is in the documentation (or in the way I'm reading it). Sorry for the false report. Quote Link to post Share on other sites
spirilis 1,265 Posted September 16, 2014 Share Posted September 16, 2014 UPDATE- Energia 13 unfortunately was built to use "-O0" (optimization turned off) for all ARM Cortex-M platforms (lm4f Stellaris, tm4c Tiva-C, cc3200) which can bloat code size or otherwise alter performance. This was done in the testing of the new CC3200 platform but never intended to stick around for the release. MSP430 not affected. Rob did a quick rebuild of the IDE with "-Os" (optimize for size, the typical default for embedded applications) and provided an updated "pde.jar" file here - http://forum.43oh.com/topic/5876-energia-0101e0013-how-turn-on-optimization-for-tivacc3200/?p=51199 Please d/l that, unzip it and replace the "pde.jar" in your Energia install with that. Under Linux it's located in energia-0101E0013/lib, see his instructions for OSX and Windows should be similar to Linux's location. Quote Link to post Share on other sites
janisalnis 1 Posted September 16, 2014 Share Posted September 16, 2014 Please note that the example you are trying to load is for a TMP006 infra-red temperature sensor, which is part of the Educational Boosterpack Mark 2. I do not believe that there is a TMP006 temperature sensor built in to the CC3200, so this probably is not an onboard sensor. On CC3200-LAUNCHXL is onboard I2C temperature sensor TMP006 chip and accelerometer BMA222 chip. They are used in Out-Of-the-Box demo. And in CCStudio examples there are files tmp006drv.c and tmp006drv.h. I have used these files in my CCStudio projects. Hope that will be possible to read them in Energia. igor 1 Quote Link to post Share on other sites
MORA99 9 Posted September 18, 2014 Share Posted September 18, 2014 On CC3200-LAUNCHXL is onboard I2C temperature sensor TMP006 chip and accelerometer BMA222 chip. They are used in Out-Of-the-Box demo. And in CCStudio examples there are files tmp006drv.c and tmp006drv.h. I have used these files in my CCStudio projects. Hope that will be possible to read them in Energia. Theres a lib for the accelerometer in the hardware folder Quote Link to post Share on other sites
igor 163 Posted September 19, 2014 Share Posted September 19, 2014 Theres a lib for the accelerometer in the hardware folder @@MORA99 Could you give a more specific location/file name? I could not find TMP006 drivers in the CC3200 folders under hardware. Quote Link to post Share on other sites
MORA99 9 Posted September 19, 2014 Share Posted September 19, 2014 @@MORA99 Could you give a more specific location/file name? I could not find TMP006 drivers in the CC3200 folders under hardware. I am fairly sure the accelerometer chip is named BMA222, I havent found one for the temperature sensor yet. Path : \Energia\hardware\cc3200\libraries\BMA222. BMA222 mySensor; mySensor.begin(); //mySensor.readXData(); //mySensor.readYData(); //mySensor.readZData(); Quote Link to post Share on other sites
igor 163 Posted September 19, 2014 Share Posted September 19, 2014 I am fairly sure the accelerometer chip is named BMA222, I havent found one for the temperature sensor yet. Path : \Energia\hardware\cc3200\libraries\BMA222. BMA222 mySensor; mySensor.begin(); //mySensor.readXData(); //mySensor.readYData(); //mySensor.readZData(); Thanks. I actually misread your posting. Since the original question had been about the TMP006 sensor, I didn't read closely enough and thought you had found a driver for that. Sorry for the confusion. Quote Link to post Share on other sites
MORA99 9 Posted September 20, 2014 Share Posted September 20, 2014 Seems I misread too I managed to get the Adafruit code working with minor changes : https://github.com/adafruit/Adafruit_TMP006 in Adafruit_TMP006.h add "#define ARDUINO 101" comment out #include <Adafruit_Sensor.h> in Adafruit_TMP006.cpp comment out #include <util/delay.h> To test it Adafruit_TMP006 tmp006(0x41); if (! tmp006.begin()) { Serial.println("No sensor found"); } //tmp006.wake(); float objt = tmp006.readObjTempC(); Serial.print("Object Temperature: "); Serial.print(objt); Serial.println("*C"); float diet = tmp006.readDieTempC(); Serial.print("Die Temperature: "); Serial.print(diet); Serial.println("*C"); Object Temperature: 24.46*C Die Temperature: 30.06*C Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.