Report
5 years, 2 months ago.

adafruit cc3000 + lpc1114

Has anyone been able to get this to work with the lpc1114? I have no problems flashing it via FTDI. With a little debugging, I see that lines 98-99 of cc3000_wlan.cpp are where I'm hanging:

while(_spi.wlan_irq_read() == 0) printf("y");
while(_spi.wlan_irq_read() != 0) printf("z");
printf("done\n\r");

I've added the print statements. I see a single y, then 59 z's, then nothing.

I'm am providing 5V regulated to the cc3000 (9v battery to a l7805scv 5V voltage regulator), and using the 3.3V pin from the cc3000 as Vin to the lpc1114.

When I construct a cc3000 instance:

#define IRQ dp17
#define EN dp25
#define CS dp26
#define MOSI dp2
#define MISO dp1
#define SCLK dp6
cc3000 wifi(IRQ, EN, CS, SPI(MOSI, MISO, SCLK), SSID, PASS, WPA2, false);

I'm running the adafruit cc3000 breakout board. So my wire mappings are:

  • lpc1114 -> cc3000
  • dp17 -> IRQ
  • dp25 -> VBEN
  • dp26 -> CS
  • dp2 -> MOSI
  • dp1 -> MISO
  • dp6 -> CLK

Is there anything obvious about what I am doing wrong?

Nick, The next thing you can try is using the small memory foot print, by adding <<code >> #define CC3000_TINY_DRIVER <</code>> to main.cpp

Dave.

posted by David Fletcher 09 Feb 2014

<<code>>#define CC3000_TINY_DRIVER<</code>> did not change anything. I noticed that pins can be defined as dp17 vs p17 and they appear to different enums (P1_8 vs P1_1). Does this change the modes of the pins? Do the pins need to be in a certain mode to function correctly? I currently have all pins defined as dpXX.

posted by Nick Desaulniers 09 Feb 2014

As that has not solved it for you , it may well be the way you have defined the pins. I don't have a device to play with at the moment, but have placed an order for a few, they should be with me in couple of days. then I will be better placed to give you a better answer, unless you fix it in the mean time. I will also take a look at the lpc1114 lib.

Dave.

posted by David Fletcher 10 Feb 2014
Comment on this question

2 Answers

5 years, 2 months ago.

Nick,

I have traced the problem to the InterruptIn method not working for the LPC1114. So in answer to your question the CC3000 cannot work with the LPC1114 until InterruptIn is fixed as the host driver depends on it, i have posted in the forum, in Bugs & Suggestions.

EDIT: Good news! If you use a port0 pin, i used dp28 the CC3000 demo works!

Dave.

Interrupt is not even invoked, have you tested David any other example? Like a button interrupt? I wonder how come this basic functionality is failing..

Regards,
0xc0170

posted by Martin Kojtal 13 Feb 2014

@Martin, Using a button will be the same as toggling a pin. I only skimmed the data sheet for the LPC1114 to see what pins could be used for interrupts, it states that all pins can be used, there is also a comment about external interrupts which if i remember correctly was not the same. I have downloaded the user manual and can dig further, if that is needed.

EDIT: I have been looking at port0 pins and have found at least dp28 works! I will check other port0 pins.

Dave.

posted by David Fletcher 13 Feb 2014

@Dave: What are "port0 pins?" How do I know which pins are such?

posted by Nick Desaulniers 15 Feb 2014

Nick, Port0 pins that work are dp1,2 ,4, 5,6,24,25,26,27,28. Download a data sheet for the device for further information. /media/uploads/dflet/lpc111x.pdf Also look here for the pin mapping http://mbed.org/users/mbed_official/code/mbed/file/869cf507173a/TARGET_LPC1114/PinNames.h

Dave.

posted by David Fletcher 15 Feb 2014
5 years, 2 months ago.

For Nick and others who end up here, in the last mbed-src (https://mbed.org/users/mbed_official/code/mbed-src/) this should be fixed, InterruptIn should then work on all ports and not only port 0. In the next release of the regular mbed lib it will also then be fixed.

Thx Erik. Hope guys make cc3000 functional with lpc1114.

posted by Martin Kojtal 18 Feb 2014

To post an answer, please log in.