cc3000-non-blocking-lib -alternative to the TI code for the CC3000 Wi-Fi 802.11b/g Network Processor

940 Med-3
cc3000-non-blocking-lib – This is an alternative to the TI code for the CC3000 Wi-Fi 802.11b/g Network Processor @ Google Project Hosting.

The CC3000 http://processors.wiki.ti.com/index.php/CC3000 is a Wi-Fi 802.11b/g Network Processor from Texas Instruments. The modified API allows quasi non-blocking behavior for work with RT OS and/or watchdog timers etc.

It is build with arm-none-eabi-gcc v 4.7.3

The CC3000 should have firmware 1.11 for server mode (sockets) there can be issues with socket listen, select, accept and bind otherwise…

Some info: If an interrupt occurs, then the data is being received and handed over to the event handler. The event handler checks the affiliation of the data (e.g. if it is unsolicited) and it checks if the data is what we have been waiting for.

I have also introduced a flow_handler. This completely handles outgoing and incoming data and also the different states of the CC3000. All executive actions are handled there. In the main loop we only set the next action to execute and perhaps handle some of the payload data.(e.g. with recv and send)

There are two important variables: cc3000_desired_state and cc3000_current_state Everytime a command is sent and we expect a return, then cc3000_desired_state is incremented. If we then received the desired code, cc3000_current_state is incremented. If desired state equals current state, then cc3000_is_ready() will return 1 and the next state is set after we processed the data.

At the moment I check for the isr and also if the irq pin is low in the main loop. The goal is to only check for the isr flag, but due to some strange timing things in the CC3000 I have to check for both, because for some reason if I do not print out the debug strings, then the initialisation goes wrong. (The code also works if there is no interrupt at all and the pin is just polled in the main loop)

At any time there will be no wait states. After a command has been executed the program will immediately go back to the main loop. There are more functions (we need a function to request data and one to handle the received payload) and more buffers (which can be reduced). But overall there is more control over what is going on.

Thanks Johannes!

Make a robot friend with Adafruit’s CRICKIT – A Creative Robotics & Interactive Construction Kit. It’s an add-on to our popular Circuit Playground Express, FEATHER and other platforms to make and program robots with CircuitPython, MakeCode, and Arduino. Start controlling motors, servos, solenoids. You also get signal pins, capacitive touch sensors, a NeoPixel driver and amplified speaker output. It complements & extends your boards so you can still use all the goodies on the microcontroller, now you have a robotics playground as well.

Join 7,500+ makers on Adafruit’s Discord channels and be part of the community! http://adafru.it/discord

CircuitPython in 2018 – Python on Microcontrollers is here!

Have an amazing project to share? Join the SHOW-AND-TELL every Wednesday night at 7:30pm ET on Google+ Hangouts.

Join us every Wednesday night at 8pm ET for Ask an Engineer!

Follow Adafruit on Instagram for top secret new products, behinds the scenes and more https://www.instagram.com/adafruit/

Maker Business — Fewer startups, and other collateral damage from the 2018 tariffs

Wearables — Light as a Worbla feather

Electronics — How to make your own magnetic field probe!

Biohacking — The State of DNA Analysis in Three Mindmaps

Python for Microcontrollers — One year of CircuitPython weeklies!

Get the only spam-free daily newsletter about wearables, running a "maker business", electronic tips and more! Subscribe at AdafruitDaily.com !

No Comments

No comments yet.

Sorry, the comment form is closed at this time.