Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Spark Core (TI CC3000) Porting for Super WiFI Mini?

CW2 Ziggurat29

  • Please log in to reply
256 replies to this topic

#41 Valkyrie-MT

Valkyrie-MT

    Advanced Member

  • Members
  • PipPipPip
  • 315 posts
  • LocationIndiana, USA

Posted 03 July 2013 - 04:59 AM

Ok, I tried to setup an Arduino with the CC3000, but I realized that the IDE for Arduino is not so great and the features are not fully implemented on the Arduino, although, I suspect they will hash it out soon.  So, I decided if I was going to be sniffing SPI traffic, it might as well be the official TI stuff.  So, I fired up a Stellaris Launchpad and the CC3000 boosterpack along with the Eclipse based IDE they use.  After some serious struggling, I have the CC3000 connected to my wireless network and it sent a UDP packet (saw it all happen in wireshark).  Now those are SPI commands worth sniffing!  My plan is to use the code, samples, and SPI sniffing to help when I need to debug and aid in command development. 

 

@ziggurat29 - I suspect you're right about the lack of raw packet support.  Honestly, I'd rather not mess with it.  I am fine with socket support as long as I can do what I need to do without restrictions. 

 

Stellaris - Green LED means Connected! 

Posted Image

 

Netduino standing by for connection to CC3000... I already have an breadboard power supply to use...

Posted Image



#42 ziggurat29

ziggurat29

    Advanced Member

  • Members
  • PipPipPip
  • 244 posts

Posted 03 July 2013 - 03:32 PM

oh cool, so you have a working system to compare against; that will be a helpful sanity check when diagnosing problems.

 

BTW, If you happen to see in your spi'ing, a case where an asynchronous event is reported before a command's return packet, let me know.  the doc is not clear about whether that can or cannot happen.



#43 Valkyrie-MT

Valkyrie-MT

    Advanced Member

  • Members
  • PipPipPip
  • 315 posts
  • LocationIndiana, USA

Posted 04 July 2013 - 04:38 AM

...and here is a University of Utah project,

http://wiesel.ece.ut...cts/wilock/wiki

 

Wow baxter, you saved my sanity with that link.  I got the Logic analyzer hooked up to the Stellaris and was easily able to step through the code and capture the traffic.  But, I could not understand how opcode 0x40 0x00 turned into 0x01 0x00 0x05 0x00.  Then I after wasting a few hours rechecking everything, I started reading and holy cow, that link has a logic analyzer trace that is IDENTICAL to mine for the first command of HCI_CMND_SIMPLE_LINK_START.  Eureka!  It does work!  I clearly just don't understand what I am looking at yet. 

 

Now I need to figure out how this:

#define HCI_CMND_SIMPLE_LINK_START 0x4000

turned into this on the SPI bus:

0x01 0x00 0x05 0x00

 

I'm sure I just need to read more at this point.  I think once I understand the command structure, I'll be able to move onto the C# bit. 

 

One thing that's interesting... you can see in the attached image the first 4 bytes, a pause, then the rest of the message.  This is the pause ziggurat29 was talking about. 

 

sniffing:

Posted Image



#44 Valkyrie-MT

Valkyrie-MT

    Advanced Member

  • Members
  • PipPipPip
  • 315 posts
  • LocationIndiana, USA

Posted 04 July 2013 - 04:55 AM

Ok, one more bit before I go to sleep...  I think this is the packet structure, now I'll have to figure the payload format tomorrow...

 

Posted Image



#45 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 04 July 2013 - 05:07 AM

@Valkyrie-MT: Great to learn you've joined this party!

 

I was under the impression those structures were actually pretty well documented.

http://processors.wi...Interface_(SPI) http://processors.wi...ogramming_Guide

 

...or am I missing the point here?

 

EDIT: At the time of writing, I noticed that the TI wiki seems to be having some problems but the links have worked before so it's probably just a matter of time before the problem is solved.

 

EDIT: Links are ok again  :)



#46 baxter

baxter

    Advanced Member

  • Members
  • PipPipPip
  • 415 posts

Posted 04 July 2013 - 08:20 AM

Of note, TI is now offering one free sample of the CC3000. Previously, they wouldn't sample or it was out of stock. So I ordered a free one although I just received 2 from Digikey. DIY reflowing this part may not be so simple with all of the pads underneath the chip. Curiously, the CC3000 bag had a warning about moisture sensitive devices stating that they must be mounted within 160 hrs after opening. Also, I learned one more thing about all of the fuss regarding  the reference design of the CC3000 boost module. If a device is produced for sale that adheres to the reference design it will not have to undergo FCC certification.



#47 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 04 July 2013 - 08:38 AM

You can usually ignore those warnings, vendors typically stress such things on samples to maximize the probability of users achieving success in evaluating the part. I'm pretty sure you can leave the bag open for years and it will still work and yield an ok product for hobby purposes.



#48 ziggurat29

ziggurat29

    Advanced Member

  • Members
  • PipPipPip
  • 244 posts

Posted 04 July 2013 - 02:10 PM

You can usually ignore those warnings, vendors typically stress such things on samples to maximize the probability of users achieving success in evaluating the part. I'm pretty sure you can leave the bag open for years and it will still work and yield an ok product for hobby purposes.

yes, moisture can absorb into the epoxy, potentially causing issues in reflow oven, so they recommend baking to drive it back out if it becomes 'moist' (i think physical distortion during the process, but I can't recall precisely).  important if you're wondering why your yields are lower than expected when making a zillion units, but if you're prototyping, you're probably more suspicious of your manual soldering; at least I always am haha.



#49 Valkyrie-MT

Valkyrie-MT

    Advanced Member

  • Members
  • PipPipPip
  • 315 posts
  • LocationIndiana, USA

Posted 04 July 2013 - 02:18 PM

I was under the impression those structures were actually pretty well documented.

 

Doh. Thanks hanzibal.  Yeah, I hadn't read that document past the first page or so.  Now I see that it is exceptionally useful.  But, it's nice to see that I have the test platform working perfectly with my logic analyzer.  Now I can move on to C#. 



#50 baxter

baxter

    Advanced Member

  • Members
  • PipPipPip
  • 415 posts

Posted 04 July 2013 - 09:51 PM

Here is a shield board design. Not suitable as a breakout for the Mini, but worthwhile anyway for for regular  Netduinos.

https://github.com/l...ston/WiFiShield

 

EDIT: He could save a lot of board space with one of these:http://www.ti.com/pr...#topsidemarking

 

Incidentally, the CC3000 Boost module datasheet (Table 2-6) has a pinout error for header J10. Header J9 lists pin 7 as WL_SPI_CLK which is correct to mate with the MSP430G553 board. However, header J10 also lists pin 7 as WL_SPI_CLK. This is wrong. The correct pin designations for mating with the MSP430 should be:

Header J10 pin     function--------------     --------pin 6              WL_SPI_DIN  (MOSI)pin 7              WL_SPI_Dout (MISO)

Attached Files



#51 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 05 July 2013 - 12:32 AM

Looks like a nice board!

 

Yeah, the 5 x MOSFETs translate to and from 3V3 and Arduino 5V respectively. For Netduino projects they're not needed at all but there are hex converters if Arduino compatibility is required. There are some alternative pin routing that can be omitted as well.

 

Personally I wouldn't be soldering stuff onto such a fairly expensive board so I would put a standard 0.6" DIP24 IC holder for you know what (with the corresponding pins routed) instead of that prototyping area.

 

I don't see a 2.1 mm barrel connector for external power and I'd like to be able to use an external antenna so a uFL connector could be added.

 

If you guys like, I could tinker with a slightly different board incorporating the modifications suggested above or differently if you think otherwise would be better. I'm no RF designer but the mods would be quite small except for maybe the uFL connector.



#52 ziggurat29

ziggurat29

    Advanced Member

  • Members
  • PipPipPip
  • 244 posts

Posted 05 July 2013 - 03:18 PM

your mention (hanzibal) of the .6 dip header reminded me of something:  The width of the cc3000 is such that the pins would be under the edges of the unit;  since the sparkcore photo shows the pins will to the side of the radio module, then I suspect that it is not a standard DIP footprint, that it is two rows of pin headers on a .7 or maybe even .8 width.

well I'll be back in town in a few days.  we'll see if any coding work is left for me to do....



#53 baxter

baxter

    Advanced Member

  • Members
  • PipPipPip
  • 415 posts

Posted 05 July 2013 - 08:53 PM

ziggurat29 is right, the Spark Core is wider than a 24 pin DIP. Also, the CC3000 Boost module from TI has a uFL connector. I think the module for the Mini should incorporate the following:

 

(1) 500mA LDO regulator (2) keyed Molex socket or barrel for external power (3) 2 gate inverter for COM2 (maybe a push button for DTR) (4) TX/RX/Gnd header (5) switch for deploy or serial port COM1 (one USB cable) (6) long legged Arduino style female headers to plug into breadboard (7) 24 pin DIP for Mini (8) LEDs for indicators, decoupling caps (9) CC3000 + associated parts and uFL connector

 

Design guidelines:

(1) keep the width within the constraints of a breadboard with a minimum of one position on either side. (2) access to Mini pins from female headers or what's left on the breadboard. (3) no need to keep shield footprint for Mini

(4) if enough room, put CC3000 on bottom of module or else extend module length

 

Probably forgotten something, just first thoughts. I think sticking with a chip antenna from TIs design might be better at first. At least we know it works.



#54 ziggurat29

ziggurat29

    Advanced Member

  • Members
  • PipPipPip
  • 244 posts

Posted 05 July 2013 - 09:35 PM

Only comments I can add (for what they're worth) to Baxter's statement are:

*  LDO; low dropout from what input?  If it's a big enough difference, like 5 > 3.3., maybe ldo is not needed?  or maybe my bar for low is high? haha

*  it seems there are two potential hardware realizations:]

  1) a DIP form factor, with a premium on size/shape

  2) a shield form factor, with a premium on electrical compatibility (3.3/5v) (and also a form factor, but that's easy to achieve, but please do support the v3 pinout)

 

'2' speaks for itself, I think, and you'd probably be just fine using the Vin pin without needed a barrel connector.  Or if you really want to, use the Vin, and support an unpopulated barrel connector that can be selected via jumper or probably even solder bridge, because I suspect that the need for external versus using Vin is rare.

 

'1' maybe bears more discussion.  I do personally put a premium on the 0.6" spacing, and similarly on a 24/28/40 pin layout.  Also, I am not a mini user, so I'm naive to that market.  But...  Secret Labs' made a conscientious choice in designing the mini to be BASICStamp compatible (much as the netduinii are arduino compatible), ostensibly because this makes them more marketable by being able to leverage the existing community.  I think this has definitely worked with the 'duino' line -- can't say about mini because I'm unfamiliar.  Maybe what folks want more is 'small' rather than 'basicstamp compatible'.  In which case, I'd argue to make a 40-pin factor, with whatever pinout gives the strongest capability.

 

Lastly, out of respect for our host, Secret Labs is a hardware company.  They don't make anything off the software at all.  The software is free, and open (happily), and exists to support their hardware sales.  So, personally I feel a little awkward about discussing too much the notion of making alternative hardware in this forum, unless it's in the context of 'if you build this, we will come'.  Everything discussed up to this point has been completely open, but I mention this now really just to be explicit and clear.



#55 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 06 July 2013 - 12:25 AM

Great, those are some really good guide lines!

 

Admittedly, I haven't read your posts all that thoroughly yet (it's late over here) and surely there are things to be discussed but just to be clear that I was merely picturing a really basic (yet powerful and versatile) Wifi board for the common Netduino user to benefit from, not the next "Wifi bershield" :-)

 

Primarily, I was thinking a Netduino specific board with header layout to match. Heck, the world is overwhelmed by Arduino stuff as it is, and it's not like we would be making a zillion unit thing with a technical height that could withstand more than a week on eBay given every little peace of additional hardware adds to overall costs in terms of time and consequently that of gold.

 

Basically making a few simple mods to that github board (undoubtedly nice work) in order to get a cheap, quick and dirty wifi board for the whole Netduino family of boards (not excluding the mini) with a managed driver to go as I know of which the ancient lady warrior being extremely resourceful when it comes to the latter of things :-)

 

@ziggurat29: Have you ever considered politics or have they perhaps already got to you?  :P  SMD.



#56 baxter

baxter

    Advanced Member

  • Members
  • PipPipPip
  • 415 posts

Posted 06 July 2013 - 01:56 AM

Hi ziggurat29,

The Centerblack design breakout back at post #10 should be perfectly suitable for breadboard testing the CC3000. I think the intent discussed here is to incorporate a bit more functionality on the breakout, not to go into competition with SL. The size of the TI CC3000 Boost module is 60mm x 35mm with a lot of wasted space. In an even smaller area, you could put a socketed Mini on top and the CC3000 on the bottom for a crude emulation of of the Spark Core, but with Micro Framework capability. The real challenge is the software port  which can hopefully be solved by you and Valkyrie-MT.

 



#57 ziggurat29

ziggurat29

    Advanced Member

  • Members
  • PipPipPip
  • 244 posts

Posted 06 July 2013 - 01:57 AM

...

@ziggurat29: Have you ever considered politics or have they perhaps already got to you?  :P  SMD.

politics?  never.  you got me beat this time on the reference joke, though!

 

But the ancient dusty frustum of a pyramid numbered 3^3 + 3 - 3/3 will give it a rest until the day of the moon....



#58 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 06 July 2013 - 03:00 AM

Hmm...now I can't sleep trying to figure that one out :-)

#59 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 06 July 2013 - 03:08 AM

Extremely off topic now: The triangle of binomial coefficients, a.k.a. the triangle of Pythagoras perhaps? But what about monday... EDIT: I'm so stupid, 29 as in your nick will go lay down now. A miscalculation, sleep well! EDIT: Nope, wrong again I think. I actually came to think about the tower of Babel and then found out about Ziggurat: http://en.wikipedia....urat_at_Babylon It was not until I saw the tower that I realized that your avatar depicts it. The number 29 according to the formula has probably something to do with the dimensions of the tower structure. This does not solve the riddle but interesting never the less. I have to give this some more thought and a bit of reading. I find these kind of things highly interesting. Sorry for all the off-topic stuff here guys.

#60 hanzibal

hanzibal

    Advanced Member

  • Members
  • PipPipPip
  • 1287 posts
  • LocationSweden

Posted 06 July 2013 - 02:50 PM

Anyway, I started working in Eagle yesterday but didn't get much farther than removing removing mosfets and moving some passives closer to each other. Naturally, you'll get to give your input when I get something to show. Oh and also, I removed the proto area.




1 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users


    Yahoo (1)
home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.