Jump to content
43oh

Are USB and I2C ports compatible?


Recommended Posts

I'm in the middle of a project using the f5529 launchpad and Energia.  I'm trying to use both the USB and the I2C port at the same time.  I can initialize the USB and see it enumerate in the windows device manager and I can read/write to it and it works properly.  But as soon as I try to enable the I2C port using the USCI_B1 the USB dies and can no longer be read or written to. 

 

The example codes in Energia work for both the USB examples and for the TMP006 example, so the harware is OK.  But trying to get them both to play at the same time is a nogo.

 

What am I missing?

 

#include <USBSerial.h>
#include "tmp006.h"
#define USE_USCI_B1

USBSerial mySerial(1); // USB
tmp006 tmp006;

void setup()
  {
  // open the USBSerial port
  mySerial.begin();
  mySerial.println("setup!");

  // Setup the temperature sensors
  //The following line is killing the USB port
  tmp006.begin(FOUR_SAMPLES);    // Takes 4 averaged samples for measurement
  }

void loop()
  {
  mySerial.println("loop!");
  }
 

Link to post
Share on other sites

OK, Responding to my own question :-)

 

The MSP430-USB com port does eventually start working, it takes about 40 seconds to start.

Why this is so is still a mystery.

 

This is pretty unacceptable behavior for a system to have.

 

Anyone have any ideas?

 

Will

 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...