Jump to content
43oh

Recommended Posts

I am using a CC3200 LaunchPadXL and want to control the green and orange LEDs as well as access the on-board temperature sensor.

 

It appeared not possible, if I2C is used. In LAUNCHXL LEDs are wired to the same lines as onboard jumpers for I2C SCL and SDA lines.

 

I found a reference that seemed to indicate on a CC3200 other pins can be used for I2C and in the example they edited the file pinmux.c

          MAP_PinTypeI2C(PIN_05, PIN_MODE_5);  //I2C SCL

          MAP_PinTypeI2C(PIN_04, PIN_MODE_5);  //I2C SDA

I tried adding those lines to my Energia setup() {...} but it didn't seem to help :(

 

I tried removing the jumpers (J2 and J3) as per another suggestion but then the code appears not to run on the device at all :(

Link to post
Share on other sites

hmmm. adding a Wire.setModule(0); to my setup() gives the following error:

 

obm_01.cpp.o: In function `setup':
obm_01.cpp:(.text.setup+0x6): undefined reference to `TwoWire::setModule(unsigned long)'
collect2: error: ld returned 1 exit status
 
looking at the source in https://github.com/energia/Energia/tree/master/libraries/Wire there doesn't appear to be a setModule function defined, and there was a discussion (back in 2013) that didn't seem to go anywhere https://github.com/energia/Energia/issues/285
 
am I missing something obvious (see "noob class" label!) or should I file a bug and hope we can get a fix (cc @@energia )?
Link to post
Share on other sites

setModule is not available for CC3200. There is only one I2C peripheral. Below is the answer to your question I just posted on e2e:

 

"Unfortunately there are not a lot of options here. The is only 1 I2C peripheral and not all pins are brought out to the LaunchPad headers.
1: pin 1/2 are the default and routed to pins 9/10 of the BoosterPack header.
2: pin 3/4 are already connected to TX/RX of the UART which is pins 3/4 of the BoosterPack header and connected to the FTDI chip. You could potentially give up the UART (Serial) and use these pins for I2C. Energia however is not setup to use these pins for I2C and you would have to modify the Wire library to enable them.
3: pin 5/6 could be an option but then you would give up SPI since SPI CLK is on pin 7 of the BoosterPack header. Same as 2, this would require modification of the Wire library.
4: pin 16/17 are JTAG"
 
Robert
Link to post
Share on other sites

Thanks (for reply here and on e2e). So essentially I am out of luck... Either the LEDs keep glowing, or I have to use an off-board temp sensor and pull the jumpers?

If there is a way to do it with Energia just while I am playing around D it would be great, as then I can actually use the three lights in a more meaningful way...

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...