Jump to content
43oh

SimplelinkWifi Library with BOOSTXL-SENSHUB + CC3000


Recommended Posts

Hey guys, I was just wondering if anyone has tried the SimplelinkWifi Library (included in the newer Energia releases) with a CC3000 attached to the RF connectors on a BOOSTXL-SENSHUB? From a quick look at the SENSHUB User Guide, it appearrs the proper lines (SPI, UART, etc.) are routed correctly on the Stellaris / Tiva C Launchpads (unfortunately not the F5529).

 

I imagine it should work if I change some pin definitions, but I wanted to check if anyone else had tried it before I dove in and spent a bunch of time for nothing. (Why reinvent the wheel?)

 

I picked up my CC3000 in a bundle with the Fraunchpad last summer, before the CC3000 BoosterPack was out, so I'd rather just use that with the RF sockets on the SENSHUB.

Link to post
Share on other sites

Yeah, I have seen that, but the SENSHUB should do the same thing for the Tiva C. I know the Tiva C Launchpad and F5529 Launchpad have different pinouts, so far as SPI, I2C and UART are concerned. In this case I'm intending to use the CC3000 EVM with the Tiva C, so this should work. I just wanted to see if anyone had tried this particular combination? :)

 

dc5ZPlL.jpg

Link to post
Share on other sites

More debugging! I hooked my Logic 16 up to the SPI0 pins on the Tiva C and I'm getting absolutely nothing on MOSI, MISO and SCK. I do see the CC line being pulled high, however it never goes low again. So it seems like SPI traffic is never even attempting to start.

 

As an aside, I looked up the Energia pin map for the F5529 Launchpad and the only set of SPI pins that match up between it and the Tiva C would be SPI2 (on the Tiva C). So I was thinking that's what Energia uses as the default for the SPI Library on the Tiva C, but I'm not getting any activity out of that set of pins, either. Same with SPI1 and SPI3. (Plus that wouldn't explain why CS isn't even going low.)

 

:-/

Link to post
Share on other sites

Boom, baby!

 

CC3000.png

 

I used jumper straps to re-wire the SENSHUB board's RF_SPI outputs to the SPI2 pins on the Tiva C Launchpad. Ran the "Firmware Upgrade" sketch, which successfully completed in about 5 seconds, then put the "Simple Web Server" sketch on, which oddly wouldn't connect to my unencrypted network (used the WiFi.begin(ssid); line instead of WiFi.begin(ssid, pass);). I didn't think it would handle the main (WPA2) network since the SSID contains spaces and the ampersand, impressively it worked just fine!

 

So, here's the $10,000,000 question: Can I get Energia to use SPI0 instead of SPI2? If so, the BOOSTXL-SENSHUB will 100% work as an RF adapter for the CC3000 on Tiva C boards under Energia. TI sometimes bundles those two items together at a very generous price, so it might be handy if we could implement support for it if possible. This particular BoosterPack, um, packs a ton of sensors that could be handy to read over WiFi. If support for SPI0 is possible, I'd love to write up a variant of the simpleWebServer sketch that serves up a dynamically updating page with all the sensor data, as an example of this board combination.

Link to post
Share on other sites

Yeah, I'm using Release 11. @@Rei Vilo mentioned something to me about an issue with alternate SPI ports on Tiva/Stellaris boards in the latest Energia release? Something about an older set of pin definitions or SPI library being used, I think. I tried replacing the files in hardware/lm4f/libraries/spi with the current versions from Github, but it didn't seem to make a difference.

 

I tried a simple test last night by hooking my Logic 16 up to the SPI0 pins and just writing some test data out. It compiles fine, but I'm not picking anything up. Do you want to give it a test and see if it's working on your end?

 

As an aside, does Energia support the other I2C modules on the Tiva C? Some of the SENSHUB's sensors will need that.

Link to post
Share on other sites

Hi,

 

I tested this configuration last days. Problem is the CS pin. 

with:

  SPI.setModule(0);

  WiFi.setCSpin(12); // 18: P2_2 @ F5529, PE_0 @ LM4F/TM4C
  WiFi.setENpin(38); // 2: P6_5 @ F5529, PB_5 @ LM4F/TM4C
  WiFi.setIRQpin(28); // 19: P2_0 @ F5529, PB_2 @ LM4F/TM4C

it doesn't works.

So I wired the CS pin to pin 32 and it works. 

 

Next problem is the heat from CC300 and uC. All measured temperatures are too high (2..5

Link to post
Share on other sites
  • 4 months later...

Yeah, I'm using Release 11. @@Rei Vilo mentioned something to me about an issue with alternate SPI ports on Tiva/Stellaris boards in the latest Energia release? Something about an older set of pin definitions or SPI library being used, I think. I tried replacing the files in hardware/lm4f/libraries/spi with the current versions from Github, but it didn't seem to make a difference.

 

I tried a simple test last night by hooking my Logic 16 up to the SPI0 pins and just writing some test data out. It compiles fine, but I'm not picking anything up. Do you want to give it a test and see if it's working on your end?

 

As an aside, does Energia support the other I2C modules on the Tiva C? Some of the SENSHUB's sensors will need that.

@@timb, I just revisited this issue and the below Sketch behaves correctly with my an Aardvark SPI testing tool. The transactions look OK to when looking at it with a logic analyzer.

 

Can you try the Sketch below to see if it works for you?

// include the SPI library:
#include <SPI.h>

// set pin 8 as the slave select for the digital pot:
const int slaveSelectPin = 12;

void setup() {
  Serial.begin(9600);
  // set the slaveSelectPin as an output:
  pinMode (slaveSelectPin, OUTPUT);
  // initialize SPI:
  SPI.setModule(0);
  SPI.begin(); 
  SPI.setClockDivider(SPI_CLOCK_DIV8);
}

void loop() {
  Serial.print("SPI: 0x");
  digitalWrite(slaveSelectPin, LOW);
  Serial.println(SPI.transfer(0xAA), HEX);
  digitalWrite(slaveSelectPin, LOW);
  delay(500);
}
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...