Nucleo F401RE and CC3000


Has anyone successfully used the CC3000 with the Nucleo?
Board is Viperized and other examples work OK.
Cannot get any reponse on the serial ouput using standard CC3000 examples.
Do you have the pinouts you used?
Does the CC3000 auto_init work?
Any help would be appreciated.


Hello kenr,

few questions to try to solve the issue:

- cc3000 shield or breakout? The shield is connected to D13,D12,D11 for SPI and uses D10,D5 and D3 as CS, Wifi Enable and Wifi Irq respectively. The breakout must be connected the same way to work with auto_init. Otherwise you must use the init function passing the different wiring.
- is your cc3000 firmware at version 1.13 or greater? Check this out for info. Viper driver is not compatible with firmware releases before 1.13.
- have you tried the cc3000 on the arduino?
- is your board a f401? It seems a stupid question, but at the moment the IDE recognizes every nucleo board as f401…(I lost an afternoon of hellish debugging to discover it wasn’t my f401 but the l152 plugged in  :s ) 

I just tested the viper app example on a nucleo with a cc3000 shield and it works…



Thankyou for your fast response.

1. breakout
2. appears wired correctly. Not clear on the passed values required to use the init function.
3. updated to latest firmware
4. yes on Uno and Due both work fine. Got Due to work with Viper App Basic on Android. Couldn’t figure out how to connect with TOI shield on top, so could not do further  TOi Shield Viper App testing.
5. definitely an F401RET6

I’m beginning to think it may be power supply related. I’m just using the laptop USB at the present. Should receive a USB power monitor in next couple of days to measure voltage and current consumed. What power supply are you using?

I will continue testing tomorrow

As an aside, I think you (and the team) have achieved a great deal to get Viper where it is today and I think it will be very significant in the embedded world going forward. I’m so impressed with Viper so far I have purchased the Nucleo, Due and Photon to add to the Udoo and TOI shield I already had so that I can evaluate the unique advantages of each platform utilising Viper.

Looking forward to next release so I can really get to grips with the Photon wifi. If I can be of any help, let me know.

Thanks again for a great system.



Hi @kenr 
Thakns you for your active contribution to Viper we are working hard for making it more and more powerfull because we know that people like you need to go beyond the current approch used in prototyping for embedded.

4.   you can wire any spi module using the TOI Shield AUX connector. The pin routing is reported here:

On Arduino footprint Aux 3, 4 and 5 are SPI Mosi, Miso and SCK
You can use Aux 7, 8 and 6 as CS pins.

In this case you need to use the 
init function (instead of auto_init) passing the selected wiring.

use the table reported here (from the TOI Shield guide) for wiring a photon. 



Thanks for this.
I’m still stuck with what aux pin to connect the UREN (enable) pin on the CC3000 too for auto_init to work?
Also unclear on the values for:  init(spi, nss, wen, irq)
Is it init(SPI0,AUX7,AUX??,AUX??)?
The documentation is unclear on this.


referring to the following image:

the call “init(SPI0,A2,D14,D15)” should be correct if:

AUX3 (D11) is connected to breakout MISO
AUX4 (D12) is connected to breakout MOSI
AUX5 (D13) is connected to breakout CLK
AUX6 (A2) is connected to breakout CS
AUX7 (D14) is connected to breakout VBEN (I guess it’s your UREN)
AUX8 (D15) is connected to breakout IRQ

Let us know!


Tested above configuration and call with:
TOI Shield v1.0
WiFi Scan and ViperApp Basic examples.

and …

Arduino Due - nope
Nucleo F401RE - nope

Connecting the CC3000 directly to the Arduino Due using Adafruit suggested connections:

MOSI, MISO and SCK to relevant pins on Due SPI connector
CS - D10
IRQ - D3

and both examples work using
Repeated tests and both examples worked.



Further testing on the Nucleo gives the following results:
SCK - D13
MISO - D12
MOSI - D11
CS - D10
IRQ - D3

c3000_auto.init or cc3000.init(SPI0,D10,D5,D3) both give same results,

WiFi Scan demo runs OK

Viper App Basic demo runs and serial output is:
  Establishing Link…
followed by
  IOError @[002F:0013:0000:0059:0000:0000:0000:0000]

I hope this additional info helps you to bottom out issues.


Interesting…if wifi scan demo runs, the wiring and the init arguments are ok :slight_smile:

Now for the IOError, if you click on the red “X” that appears on the console you can see where the exception is raised.
However I bet is the CC3000 not linking to the AP correctly (assuming network name and password are ok). You may need to modify the example by retrying to link if an exception is raised. Something like:

for i in range(10):
#link code
break # cool, we are connected
  continue # try again
# sorry can’t connect

You are correct it is not connecting to the AP.
The same settings work with Arduino Due.
Tried your multiple attempts code:

for i in range(10):
        cc3000.init(SPI0,D10,D3,D5) # init(spi, CS, VREN, IRQ) - Nucleo
        print("Establishing Link...")"BrightBox-jfxwbm",wifi.WIFI_WPA2,"five-vet-rapid")
        break # cool, we are connected
    except Exception as e:
        continue  # try again
    print("Failed") # sorry can't connect

Same result - no connection.

I'm left with two possible reasons:

1. USB derived 3V3 power on Nucleo is insufficient to power the CC3000.
   (I have seen YouTube videos of a Nucleo powering a CC3000 plus TFT LCD from USB power.
    Programmed using mbed)
   Measuring volts and current at the USB shows no drop in voltage and current stays around 200mA.
   Connecting Nucleo to remote power supply is not straightforward, so have not attempted yet.

2. The Viper VM is different for the Nucleo. Could it be a VM related issue.

I'm only trying to use the ViperApp TOI example but cannot for the following reasons:
   a) I cannot get the Broadcom wifi to work on my Photon with v0.2.009 (see separate thread)
   b) Cannot get CC3000 running via Aux connector on Arduino Due.
       (Cannot access Due pins with shield fitted)
       (See separate thread.
   c) Cannot get CC3000 to connect on Nucleo (this thread).

Looks like I will have to abandon trying to use the TOI shield plus ViperApp with the examples given.

I'm reverting to mbed examples for the Nucleo and the Photon IDE examples for the Photon to see if I can get these working. I'll worry about the TOI shield later.

This is a little disappointing as I had hoped Viper would give me the high level language I need for the variety of ARM based boards available today.

Thanks for your help so far. If you have any more ideas, please let me know.



Since sorting out the browse cache (see other post) the following issues have been resolved:

1. Nucleo functioning, including CC3000. The ViperApp Basic now works in both directions.

2. Photon functioning including Broadcom wifi

3. Due functioning including CC3000 wifi.

Have still to resolve ViperApp Advanced with the TOI shield.

Regarding connections to TOI Aux Connections, you originally gave the following response:

the call "init(SPI0,A2,D14,D15)" should be correct if:

AUX3 (D11) is connected to breakout MISO
AUX4 (D12) is connected to breakout MOSI
AUX5 (D13) is connected to breakout CLK
AUX6 (A2) is connected to breakout CS
AUX7 (D14) is connected to breakout VBEN (I guess it's your UREN)
AUX8 (D15) is connected to breakout IRQ

I think this is incorrect as Aux7 and Aux8 are D58 and D59 in Viper Pin numbering. Will be testing this later.