Jump to content
43oh

RobLewis

Members
  • Content Count

    59
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by RobLewis

  1. Has anyone worked with TI's CC2540 RF Dongle? I'm trying to use their Bluetooth LE packet sniffer program but it appears to have problems with Windows 10. The quick-start says that when you connect the dongle to the PC's USB port, the "Windows New Hardware Wizard" will appear. But it doesn't. And the sniffer software doesn't see the dongle. No doubt a driver problem but I don't know how to fix it.

  2. Success, sort of: 

     

    By going back to the old BMP085 breakout board AND using the patch for the 8-bit read AND changing the F5529 board clock setting from 16 MHz to 25 MHz, I'm now getting apparently good data from the part: 

     

    Setup has initialized Serial

    Setup has initialized Wire
    Attempting to read BMP085 CHIP ID with patched m_read8...
    AC1=7509
    AC2=-1137
    AC3=-14499
    AC4=34075
    AC5=24637
    AC6=26359
    B1=5498
    B2=60
    MB=-32768
    MC=-11075
    MD=2432
    Setup has initialized Serial, Wire, and Psensor
    Reading temperature..
    UT=33838
    Reading pressure..
    UP=42343
    Calculating temperature in 0.1 Celcius..
    X1=5623
    X2=-2815
    B5=2808
    T=176
    Calculating pressure in Pascal..
    B6=-1192
    X1=10
    X2=661
    X3=671
    B3=7677
    X1=2109
    X2=29
    X3=535
    B4=34631
    B7=1733300000
    p=100101
    X1=152881
    X1=7086
    X2=-11238
    p=100078
    Temperature: 17.6C
    Pressure:    1001hPa
     

    I always ran the board at 16 MHz before and it worked fine for a long time, but evidently something changed. 

     

    I'm ignorant of Energia's internals, but if a low-CPU-demand routine works at 25 MHz and doesn't work at 16 MHz then I have to think something is wrong with how it's marking time. 

  3. Are you sure that you have the necessary i2C pull-ups in place?

    It worked great for over a year with the BMP085 breakout board, and I haven't changed the hardware configuration except to try it with the new BMP180 breakout board (which lacks the EOC signal), because I thought the BMP085 had failed. Tomorrow I'll go back to the BMP085 and see what's reported by the driver in debug mode. (The humidity sensor which is connected to the same LaunchPad continues to work fine.) 

  4. Tried changing this line: 

    #define BMP085_CHIP_ID   85
    
    

    to 180, and there was no change. Went back to 85, and commented out the return you suggested; still no joy. Here's what it's outputting now (note I still have your suggested patch in that discards the second byte for a 1-byte read): 

     

    Setup has initialized Serial

    Setup has initialized Wire
    Attempting to read BMP085 CHIP ID with patched m_read8...
    BMP085 device not found
    AC1=8151
    AC2=0
    AC3=0
    AC4=0
    AC5=0
    AC6=0
    B1=0
    B2=0
    MB=0
    MC=0
    MD=0
    Setup has initialized Serial, Wire, and Psensor
    Reading temperature..
    UT=0
    Reading pressure..
    UP=0
    Calculating temperature in 0.1 Celcius..
    X1=0
    X2=-1
    B5=-1
    T=0
    Calculating pressure in Pascal..
    B6=-4001
    X1=0
    X2=0
    X3=0
    B3=8151
    X1=0
    X2=0
    X3=0
    B4=0
    B7=3887417296
    p=-2
    X1=1
    X1=0
    X2=0
    p=234
    Temperature: 0.0C
    Pressure:    2hPa
    Reading temperature..
    UT=0
    Reading pressure..
    UP=0
    Calculating temperature in 0.1 Celcius..
    X1=0
    X2=-1
    B5=-1
    T=0
    Calculating pressure in Pascal..
    B6=-4001
    X1=0
    X2=0
    X3=0
    B3=8151
    X1=0
    X2=0
    X3=0
    B4=0
    B7=3887417296
    p=-2
    X1=1
    X1=0
    X2=0
    p=234
    Temperature: 0.0C
    Pressure:    2hPa
     
    And so on. 
  5. Well, something different anyway. Now when I power cycle the board, the serial monitor shows this (which includes a few diagnostic print statements I added, and has the debug-enabled version of the driver): 

     

    Setup has initialized Serial

    Setup has initialized Wire
    Attempting to read BMP085 CHIP ID with patched m_read8...
    BMP085 device not found
    Setup has initialized Serial, Wire, and Psensor
    Reading temperature..
    UT=0
    Reading pressure..
    UP=0
    Calculating temperature in 0.1 Celcius..
    X1=0
    X2=-1
    B5=-1
    T=0
    Calculating pressure in Pascal..
    B6=-4001
    X1=0
    X2=0
    X3=0
    B3=0
    X1=0
    X2=0
    X3=0
    B4=0
    B7=0
    p=-1
    X1=1
    X1=0
    X2=0
    p=235
    Temperature: 0.0C
    Pressure:    2hPa
    Reading temperature..
    UT=0
    Reading pressure..
    UP=0
    Calculating temperature in 0.1 Celcius..
    X1=0
    X2=-1
    B5=-1
    T=0
    Calculating pressure in Pascal..
    B6=-4001
    X1=0
    X2=0
    X3=0
    B3=0
    X1=0
    X2=0
    X3=0
    B4=0
    B7=0
    p=-1
    X1=1
    X1=0
    X2=0
    p=235
    Temperature: 0.0C
    Pressure:    2hPa
     
    Which repeats over and over, starting with "Reading temperature..". 
     
    Why would it say "BMP085 device not found" and then proceed to act as though it had found one? 
  6. I had to patch old versions of Energia to properly support single-byte I2C reads. Maybe that broke again with newer versions.

     

    As workaround, you can try to update mread8 in the BMP template library:

     

    // read 8 bits from I2C
      uint8_t m_read8(uint8_t addr) {
        Wire.beginTransmission(i2caddress);
        Wire.write(addr);
        Wire.endTransmission(false);
        Wire.requestFrom(i2caddress, (uint8_t)2);    // request 2 bytes
        uint8_t val = Wire.read();
        Wire.read();    // dummy read for second byte..
        return val;
      };
    
    See this thread for all the gory detail:

    http://forum.43oh.com/topic/3154-i2c-issues/

     

    Darn, that sounded like the answer, but sadly I don't see any change. It still hangs trying to read the CHIP ID. 

  7. Still no luck getting my F5529 to read the BMP180. 

     

    With or without DEBUG_BMP085 enabled, the program hangs in the begin() method. 

     

    I added a print statement to the driver just before it tries to read the BMP085 CHIP ID. I see this printout but that's the last output I get, so apparently it is hanging trying to read the ID. I don't get the "BMP085 device not found" message. 

     

    I wonder if there could be some problem in the Wire module. This is in Energia 15. Frustrating that this all worked fine for a long time. 

  8. I replaced the BMP085 sensor with a new BMP180, which is claimed to be 100% compatible, though it seems to lack the EOC output that signals the end of a conversion.

     

    Adjusted the code to use wait loops instead of the EOC signal, but the new sensor seems to be doing exactly what the old one did. In the serial monitor, what I'm seeing is the value "2" being sent as the pressure reading. And I don't seem to be getting any temperature reading at all. The separate humidity sensor attached to the same MSP430F5529 continues to work fine.

     

    This smells to me like some kind of serial I/O bit timing issue, but why would it just suddenly start happening one day?

     

    Before I try recompiling the driver in debug mode, anybody got any tips where to look?

  9. The setModule issue may be a red herring. I re-flashed the old LaunchPad code that was working fine, and am still getting the error, so the current suspect is a failed BMP085 sensor. (The other attached sensor, a DHT22 humidity sensor, continues to work fine.)

     

    Anybody experienced reliability issues with this part? Mine has been mounted indoors out of the weather the whole time, and a failure after less than 2 years is hopefully a fluke.

     

    It appears Bosch has updated the sensor to a new (and improved?) part, the BMP180, which according to AdaFruit is pin- and software-compatible. So I guess I'll be ordering one.

  10. Make sure you use the latest version as available on GitHub, it was tested with the MSP430F5529 launchpad.

    https://github.com/astuder/BMP085-template-library-Energia

     

    Make sure to call Wire.begin and optionally Wire.setModule before using the library.

     

    That being said, I haven't touched Energia in a while, so it's possible that my code needs to be adjusted for newer versions.

    Thanks for the tip, but the newer library isn't working any better than the older one. It might help if I could find some documentation anywhere of the Wire.setmodule() method (especially as regards the MSP430F5529), but I can't.

  11. OK, I'm getting confuseder and confuseder. I had the BMP085 working with an older Windows version of Energia and your library. I've updated to Energia 15 for Ubuntu and presumably have the latest version of BMP085_t.h (dated April 2013).

     

    Now my program (on the MSP430F5529) apparently no longer sees the sensor!

     

    IIRC I had to patch the earlier library to work with the F5529, but that shouldn't be necessary with this later one, right? I'm using the same "legacy" pin connections as before: SDA to P3.0 and SCL to P3.1.

     

    I did notice this in your comments at the top of your driver:

    MSP430
    ------
    
    Tested with Energia 0101E0009
    LaunchPad Rev1.5, TI MSP430G2553
    
    Connections
    * P1_6 => I2C SCL
    * P1_7 => I2C SDA
    

    If I understand, these pin assignments are used somewhere in the Wire library, and I've even read about a method

    Wire.setModule()
    

    that seemingly lets you choose from different I2C interfaces (defaulting to #3?). But I can't find any documentation of this.

    Can you help clear up the confusion?

  12. Got it to work (somehow).

    Updated UniFlash to the new version, still no luck.

    Went to the Windows XP Device Manager, and saw an entry for COM7 under serial ports (listing an FTDI driver).

    Fired up UniFlash and entered 7 as the port (why does it initialize to port 30?).

    Everything worked fine and I was able to install the CC3200 Service Pack.

     

    I'll swear I had earlier tried every port number from 1 to 20 with no luck, but perhaps the new UniFlash made the difference.

  13. Energia's installation instructions for Mac specify a USB FTDI driver that apparently hasn't been updated since OS 10.7. 

     

    Has anyone verified that it works on Mavericks and/or Yosemite? I believe that Yosemite in particular now requires "kext signing" of drivers, which has apparently caused a lot of problems for third-party software. 

  14. AFAIK MSP430F5529 LP EZ-FET Lite is CDC+CDC composite device (one port for debugger and another one for USB-UART bridge). WinXP SP2  due to the bug (usbser.sys) are not able to work with  CDC+CDC composite device. I deeply dubt that this is not included in TI installation (if they use usbser.sys). Anyway, patch is here...

     

    attachicon.gifWin XP SP2 composite upd.rar

     

    For firmware update on target device (MSP430F5529) without FET can be used USB BSL. Just download MSP430 USB Firmware Upgrade Example from... http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSP430_USB_Developers_Package/latest/index_FDS.html

     

    Plug USB cable from PC to USB target device connector (not FET). And for entering in USB BSL mode, there is no need to plug/unplug cable every time with pressed BSL button. It is enough to press RESET/BSL button together, first release RESET, and 1 second after release BSL.

    This "patch" you mention is an archive containing two different .exe files. Looking up the Microsoft KB articles it seems that KB918365 is the relevant patch. But when I try to apply it, it says that my Win XP version is newer than the patch, so there is no need to apply it. 

     

    I just installed Code Composer Studio, and it can't connect to the board, either. 

  15. A bit of additional info: 

     

    I put UniFlash into debug mode and here's the sequence of log messages when I try to do something simple like read the version number from the LaunchPad: 

     

    Begin GetVersion operation

    Executing operation: Connect

    waiting and clearing UART Rx buffer

    setting break signal

    --- please restart the device ---

    (I hit the Reset button)

    wait for ack

    UART timeout

    --- COM Port timeout on ACK read

    ---reading ACK signal failed---

    disconnecting from device . . .

    --- Connection failed trying to reconnect... (1 attempt)

    waiting and clearing UART Rx buffer

     

    And so on. 

     

    As reported in initial post, I get "Can't connect...please check your COM port settings. Error code -3" 

    Anybody know what error code -3 is? I don't see any obvious way to examine or change the COM port settings, anyway. 

    I suppose the above behavior could be explained by something like a wrong baud rate, but this is after all a USB connection, presumably emulating a serial port. 

×
×
  • Create New...