0

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!


Please vote for Limor Fried (Ladyada) for Red Hat’s Women in Open Source Award
Our Ladyada (Limor Fried) was nominated for Red Hat’s Women in Open Source Award! Please vote for her! Visit: https://www.redhat.com/en/about/women-in-open-source

Stop breadboarding and soldering – start making immediately! Adafruit’s Circuit Playground is jam-packed with LEDs, sensors, buttons, alligator clip pads and more. Build projects with Circuit Playground in a few minutes with the drag-and-drop MakeCode programming site, learn computer science using the CS Discoveries class on code.org, jump into CircuitPython to learn Python and hardware together, or even use Arduino IDE. Circuit Playground Express is the newest and best Circuit Playground board, with support for MakeCode, CircuitPython, and Arduino. It has a powerful processor, 10 NeoPixels, mini speaker, InfraRed receive and transmit, two buttons, a switch, 14 alligator clip pads, and lots of sensors: capacitive touch, IR proximity, temperature, light, motion and sound. A whole wide world of electronics and coding is waiting for you, and it fits in the palm of your hand.

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

CircuitPython 2019!

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 — The strange world of low-margin online returns

Wearables — Liquid magic

Electronics — Diamonds may be forever… but components? Not so much.

Biohacking — Raspberry Pi Health Dashboard

Python for Microcontrollers — Python on hardware, a portal to a world of fun! #Python #Adafruit #CircuitPython @circuitpython @micropython @ThePSF @Adafruit

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.