6 years, 3 months ago.

Problems using cc3000 with mbed lpc1768 board


I'm trying to get the Adafruit CC3000 breakout board to work together with the mbed lpc1768 board.

I used the code in this thread: https://mbed.org/questions/1814/Setup-for-Adafruit-CC3000-and-the-mbed-L/ (as far as I can see, the examples in CC3000 cookbook do not yet support the LPC1768)

I saw the following on the cookbook page:

"Two boards that do have a supply sufficient to power the module are the WiFi DipCortex and the Adafruit breakout board. The adafruit breakout board can also be used with 5v MCUs"

So I am powering the 5V input on the breakout board directly from the 5V output of the mbed board, not directly from the mbed 3.3V regulator.

I have it wired up as in the main.cpp file.

It gets stuck in this function in, called from wifi.start(0) in main.cpp.

It gets stuck in an eternal loop in

uint8_t *cc3000_event::hci_event_handler(void *ret_param, uint8_t *from, uint8_t *fromlen);

while (1)
    if (_simple_link.get_data_received_flag() != 0)
    // ...

get_data_received_flag never returns anything else than 0.

Sometimes it also gets stuck earlier, waiting for the IRQ line:

void cc3000_wlan::start(uint16_t patches_available_host);

// wait till the IRQ line goes high and then low
while(_spi.wlan_irq_read() == 0)
while(_spi.wlan_irq_read() != 0)

The CC3000 home page does have the software that supports the LPC1768, it just needs to be setup correctly. With regards to the power supply, USB is limited to 500mA, which is not enough to power the LPC1768 and the CC3000, you will need a power source capable of sourcing at least 550mA worst case, so >600 mA would be fine. Dave.

posted by David Fletcher 24 Mar 2014


Thanks for the help. It was indeed a power supply issue.

Supplying 5V to the CC3000 breakout board from a dedicated 5V supply works!

I diffed the cc3000_hostdriver_mbedsocket in the zip file with the latest one on mbed.org, and it appears that the mbed.org one is newer, so I will try to use that next.

If I understand correctly, all that is needed for LPC1768 support is the following init:

NVIC_set_all_irq_priorities(0x3); NVIC_SetPriority(SPI_IRQn, 0x0); Wi-Fi SPI interrupt must be higher priority than SysTick NVIC_SetPriority(SysTick_IRQn, 0x2); SysTick set to lower priority than Wi-Fi SPI bus interrupt

In the zip file, init.cpp includes LPC1768_irq_prio.h, which is where NVIC_set_all_irq_priorities is defined. It sets the priorities for a long list of IRQs.

In the version on mbed.org, the include file is called NVIC_set_all_priorities.h, and sets the IRQ priorites in a loop. LPC1768 is listed as supported in this file, so I'm wondering if I could just go with this version instead of LPC1768_irq_prio, which would make it easier to switch uC later.

As for the internet connection via the cc3000 board. I was able to connect and get DHCP just fine with one of my access points, but when I tried on my Airport Express, it never receives DHCP.

The cc3000 cookbook says V1.11 is required, but I'm not sure how to interpret the printout I get from the demo program:

MAC address 08:00:28:57:55:dd

FTC 7 PP_version 191.4 SERV_PACK 153.16 DRV_VER 49.4.153 FW_VER 10.49.19

posted by Per J. G. 25 Mar 2014
Be the first to answer this question.