Jump to content


  • Content Count

  • Joined

  • Last visited

About nkopp

  • Rank

Profile Information

  • Interests
  1. I refactored my code to reduce global memory usage significantly, and I'm still getting weird results from snprintf (and sprintf) as well as the String class. Sometimes the numbers it prints are "0" and sometimes they contain garbage values. Even though these code snippets that show the problem exist in the context of other (proprietary) code, I don't see how the other code could cause problems, other then maybe by using too much memory. This system isn't multi-threaded, so I don't think there's any way for other code to modify memory between statements.
  2. Thanks for the reply. I have tried all of the following things: Use smaller buffer - I've tried various sizes. The original "real" code was using a longer string with more numbers, but even this shorter version showed the problem. Initialize to zeros - I think this shouldn't be necessary for sprintf or snprintf, but it didn't help. Use snprintf - Actually, I was using snprintf originally, but I changed back to sprintf to simplify the description of the problem. Using Strings instead of sprintf or snprintf sometimes this produces better results, but sometimes it produces very similar result
  3. I have a large sketch in Energia for the CC3200 LaunchXL. Sometimes sprintf does weird things. For example,this code... char buffer[500]; sprintf(buffer, "%f, %f, %f, %d", 1.0, 2.0, 3.0, 4); Serial.println(buffer); sometimes produces this result: 0.000000, 0.000000, 0.000000, 536966100 This looks incorrect to me. There seems to be a pretty significant bug in the Energia+CC3200 implementation of sprintf. It seems that the size of global variables or maybe the stack might be an influencing factor, but I really can't figure it out. Any ideas for how to fix this? (Note: cros
  4. I also have been unable to get SmartConfig to work with Android and CC3200. I just recently tried Energia 18 + CC3200 + Android SmartConfig (both "SimpleLink
  5. Any updates on this? I am hoping to use Energia to code a battery-powered device. I would like to test all three modes mentioned in the original post (LPDS always-connected, LPDS with both sleeping, and Hibernate). I checked the current cc3200 code and didn't see anything. Is there an experimental branch in GitHub that I could test? I'm willing to help debug the code.
  6. Another update: I've tested an equivalent demo using Code Composer Studio, and everything worked properly for both 400KHz and 100KHz speeds. So, it seems that the issue is with Energia.
  7. Thanks for the suggestion. I've tried with 5K pull-ups and 1K pull-ups, using the VCC 3.3v power supply to power the sensor. The 1K resistors seemed to maybe give the best results, allowing me to sometimes read the correct value for the occasional byte, though most of the time the value still showed 0xFF for each byte. Unfortunately, I don't currently have an oscilloscope to help with debugging.
  8. The breakout board I'm using (GY-906) supposedly uses the 3.3v version MLX90614ESF-BAA-000-TU-ND, and appears to have built-in 10k pullups for SDA and SCL, as well as a voltage regulator to allow it to use either 3.3v or 5v. I have been using the 5v pin of the LaunchXL to power the sensor. I tried using VCC (3.3v) instead, but received much the same results. I also tried adding my own 10k pullups, but that had not effect either. Today I'm not getting 0xFF 100% of the time. Still the results are usually 0xFF, but when I get other values they seem pretty random. The sensor still works pr
  9. Quick clarification about what is "not" working: With the MLX90614 on the I2C bus running at 100 KHz, I seem to be getting back 0xFF for everything. Also, here's some info that I came across regarding this. https://e2e.ti.com/support/wireless_connectivity/simplelink_wifi_cc31xx_cc32xx/f/968/t/537475 I have already ensured that I'm not sending a stop bit when requesting the register value. Here's the relevant code from the Adafruit MLX90614 library: uint16_t Adafruit_MLX90614::read16(uint8_t a) { uint16_t ret; Wire.beginTransmission(_addr); // start transmission to device
  10. I have a project using an MLX90614 that I have prototyped on an Arduino. Now I want to move to the CC3200 to add WiFi support. I've been fighting with the I2C for a few days now and could use some help. A few notes: The built-in I2C sensors (BMA222 and TMP006) work fine in the default configuration. The max speed for the MLX90614 is 100 KHz, but the default for the CC3200 is 400 KHz The MLX90614 is technically SMBus, but it works flawlessly with the Wire library on a standard Arduino. I have modified the Wire library in the hardware/cc3200 folder to call MAP_I2CMasterInitExpClk(I2C_BASE,
  • Create New...