Page 1 of 1

CC3100-Boost demo board

Posted: Mon Nov 10, 2014 5:41 pm
by blmorris
I just received a set of TI's CC3100 evaluation boards - after getting the sense here and elsewhere that the CC3000 is just generally problematic and that the CC3100 is TI's attempt to fix the situation, I decided to skip straight to the CC3100 and try it with micropython.
Before actually bothering to read any documentation ;), I decided to just connect it to my pyboard as described in the modcc3k.c source code and try the existing uPy network module for the CC3k to see if it would work.
Unsurprisingly, it didn't - I also put a logic analyzer on the SPI bus and found that only one byte was sent from the pyboard to the CC3100 board, then nothing.

Code: Select all

>>> import network
>>> cc3100 = network.CC3k(pyb.SPI(2), pyb.Pin.board.Y5, pyb.Pin.board.Y4, pyb.Pin.board.Y3)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: Failed to init wlan module
Sometime in the next few days I expect to dig deeper into this with a more serious effort, but I just wanted to ask if anyone else has tried to use the CC3100 and had any success yet.

-Bryan

Re: CC3100-Boost demo board

Posted: Mon Nov 10, 2014 8:05 pm
by nelfata
Hi,
I have the CC3100 ported onto the MP platform.
I am able to use just about all the network/socket module functionality.
TI has made major changes, from the CC3000 to the CC3100 so don't expect them to be compatible even with the SPI settings.
I integrated the SDK based on the 0.5.2 service pack and attempted to get their latest changes SDK 1.0.0 with service pack 1.0.0.1.2, but the update they provided was disappointing and there were some circular references within the header files so I gave up. I am very surprised how bad the quality of the code TI produces.
Overall the CC3100 works much more reliably than the CC3000. There are some issues at the event handling level and some undefined events occur (could not find them in the documentation), I added an update() function into the module, this need to be called periodically to process the events especially if there is no OS thread.
You need to make sure the service pack is up to date and/or matches the SDK version (again I am not sure how the versionning scheme works with TI).
I have also used the Reset pin of the module (you need to modify the BOOST module and short the pin to the on-board reset line), this might prove to be useful for making sure that the device properly started.
Now to make your life easier, I can zip a copy of the code integrated within the MP build environment and if I can ask you to get the code into Github that would be great.

Re: CC3100-Boost demo board

Posted: Mon Nov 10, 2014 8:23 pm
by blmorris
nelfata wrote:Now to make your life easier, I can zip a copy of the code integrated within the MP build environment and if I can ask you to get the code into Github that would be great.
That would be great, I would be happy to put it up on my Github account for you.

Look for a message in your forum inbox with my email address.
TI has made major changes, from the CC3000 to the CC3100 so don't expect them to be compatible even with the SPI settings.
I integrated the SDK based on the 0.5.2 service pack and attempted to get their latest changes SDK 1.0.0 with service pack 1.0.0.1.2, but the update they provided was disappointing and there were some circular references within the header files so I gave up. I am very surprised how bad the quality of the code TI produces.
I laugh - I was just browsing through TI's website trying to figure out how to get started, and I think that I saw them refer to 1.0.0.1.2 as the first "production quality" release.
Not sure if I will be the one to solve the circular references, but I'll be happy to look into it.
-Bryan

Re: CC3100-Boost demo board

Posted: Wed Nov 19, 2014 6:27 pm
by blmorris
Nadim's (nelfata's) code is now posted on my Github account: https://github.com/blmorris/micropython-cc3100

Tests, contributions, comments welcome.
-Bryan

Re: CC3100-Boost demo board

Posted: Thu Nov 20, 2014 1:12 am
by nelfata
Bryan,
thanks for taking care of this on my behalf. I hope other developers would find this useful and provide some feedback.
I want also to mention that TI requires that the .update() function to be called periodically, so that the underlying handlers can respond properly to events.