Hi everyone.
I just started porting the driver for CC3100 to a custom STM32 board.
Looking at my logicanalyser the signals seem correct and I can do basic communication with the CC3100MOD on the board. The problem is that it asserts an error (-7) if I try to do WlanPolicySet (And if I'm not misstaken sl_WlanProfileDel gives the same result).
Anyone have any Ideas what could be wrong?
Also when is code for upgrading the CC3100MOD firmware from my CPU going to be released?
In dire need since the product is already late for release since it has been redesigned from using an CC3000.
(Don't know if it helps but we've already signed your NDA).
Kind regards
Jimmy
Here's my debug output:
HW init - Done!
Get time application - Version 1.1.0
----
(sl_Start)
WiFi HW init - Done!
Sending( 4): 0x65,0x87,0x78,0x56
Recieve( 4): 0x00,0x00,0x00,0x00
Recieve( 4): 0xBC,0xDC,0xCD,0xAB
Recieve( 4): 0x08,0x00,0x08,0x00
Recieve( 4): 0x00,0x00,0x00,0x00
Recieve( 4): 0x11,0x11,0x11,0x11
Sending( 4): 0x65,0x87,0x78,0x56
Recieve( 4): 0x00,0x00,0x00,0x00
Recieve( 4): 0xBD,0xDC,0xCD,0xAB
Recieve( 4): 0x78,0x00,0x08,0x00
Recieve( 4): 0x38,0x00,0x00,0x00
Recieve( 4): 0xB3,0x06,0x11,0x11
[GENERAL EVENT] 0x1
(Mode: 0)
(sl_DevGet:SL_DEVICE_GENERAL_VERSION)
Sending( 4): 0x21,0x43,0x34,0x12
Sending( 4): 0x66,0x84,0x08,0x00
Sending( 8): 0x7C,0x0C,0x01,0x00,0x0C,0x00,0x00,0x08
Sending( 4): 0x65,0x87,0x78,0x56
Recieve( 4): 0x00,0x00,0x00,0x00
Recieve( 4): 0xBE,0xDC,0xCD,0xAB
Recieve( 4): 0x78,0x00,0x08,0x00
Recieve( 4): 0x37,0x00,0x00,0x00
Recieve( 4): 0xB2,0x02,0x3E,0x3F
[GENERAL EVENT] 0x1
Sending( 4): 0x65,0x87,0x78,0x56
Recieve( 4): 0x00,0x00,0x00,0x00
Recieve( 4): 0xBF,0xDC,0xCD,0xAB
Recieve( 4): 0x66,0x04,0x38,0x00
Recieve( 4): 0x38,0x00,0x00,0x00
Recieve( 8): 0x00,0x00,0x01,0x00,0x0C,0x00,0x2C,0x00
Recieve( 44): 0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0
x05,0x03,0x03,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x33,0x33,0x7F,0x57
CHIP 67108864
MAC 0.0.4.1
PHY 1.5.3.3
NWP 2.0.7.0
ROM 13107
HOST 1.0.0.1
(sl_DevGet:SL_DEVICE_GENERAL_CONFIGURATION_DATE_TIME)
Sending( 4): 0x21,0x43,0x34,0x12
Sending( 4): 0x66,0x84,0x08,0x00
Sending( 8): 0x7C,0x0C,0x01,0x00,0x0B,0x00,0x00,0x08
Sending( 4): 0x65,0x87,0x78,0x56
Recieve( 4): 0xBF,0xDC,0xCD,0xAB
Recieve( 4): 0xBC,0xDC,0xCD,0xAB
Recieve( 4): 0x66,0x04,0x38,0x00
Recieve( 4): 0x38,0x00,0x00,0x00
Recieve( 8): 0x00,0x00,0x01,0x00,0x0B,0x00,0x2C,0x00
Recieve( 44): 0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xDD,0
x07,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
Day 1,Mon 1,Year 2013,Hour 0,Min 0,Sec 5
(sl_WlanPolicySet)
Sending( 4): 0x21,0x43,0x34,0x12
Sending( 4): 0x86,0x8C,0x04,0x00
Sending( 4): 0x10,0x00,0x00,0x00
Sending( 4): 0x65,0x87,0x78,0x56
Recieve( 4): 0xBC,0xDC,0xCD,0xAB
Recieve( 4): 0xBD,0xDC,0xCD,0xAB
Recieve( 4): 0x86,0x0C,0x08,0x00
Recieve( 4): 0x38,0x00,0x00,0x00
Recieve( 4): 0xF9,0xFF,0x01,0x00
sl_WlanPolicySet
UPDATE:
Added delays in CC3100_disable (20 ms) and CC3100_enable(50ms) as suggested in other forum thread.
This didn't help.
I looped my code to ask for the internal clock and had it run at full speed (3900 requests/answers per second) no problem. I had my logicanalyser active at the same time and no interrupts were missed.
What I can see is that I get, what is enterpreted, an event just after calling sl_WlanProfileDel
Also if I enable the debug output of sent/recived bytes the code sometimes continues a bit further (On a few accations all the way to connecting to the network and to the NTP server), this seems to point to a timming problem.
Any Ideas?
Here is my latest debug output:
HW init - Done!
Get time application - Version 1.1.0
----
(sl_Start)
WiFi HW init - Done!
(Mode: 0)
(sl_DevGet:SL_DEVICE_GENERAL_VERSION)
[GENERAL EVENT] 0x1 (Status:-78, Sender:2)
CHIP 67108864
MAC 0.0.4.1
PHY 1.5.3.3
NWP 2.0.7.0
ROM 13107
HOST 1.0.0.1
(sl_DevGet:SL_DEVICE_GENERAL_CONFIGURATION_DATE_TIME)
Day 1,Mon 1,Year 2013,Hour 0,Min 0,Sec 0
(sl_WlanProfileDel)
[GENERAL EVENT] 0x1 (Status:-94, Sender:2)
! Fail:-7 !
And with debug of SPI data (Makes us continue passed WlanProfileDel and instead hang on WlanPolicySet):
HW init - Done!
Get time application - Version 1.1.0
----
(sl_Start)
WiFi HW init - Done!
Sending( 4): 0x65,0x87,0x78,0x56
Recieve( 4): 0x00,0x00,0x00,0x00
Recieve( 4): 0xBC,0xDC,0xCD,0xAB
Recieve( 4): 0x08,0x00,0x08,0x00
Recieve( 4): 0x00,0x00,0x00,0x00
Recieve( 4): 0x11,0x11,0x11,0x11
Sending( 4): 0x65,0x87,0x78,0x56
Recieve( 4): 0x00,0x00,0x00,0x00
Recieve( 4): 0xBD,0xDC,0xCD,0xAB
Recieve( 4): 0x78,0x00,0x08,0x00
Recieve( 4): 0x38,0x00,0x00,0x00
Recieve( 4): 0xB3,0x06,0x11,0x11
[GENERAL EVENT] 0x1 (Status:-77, Sender:6)
(Mode: 0)
(sl_DevGet:SL_DEVICE_GENERAL_VERSION)
Sending( 4): 0x21,0x43,0x34,0x12
Sending( 4): 0x66,0x84,0x08,0x00
Sending( 8): 0x7C,0x0C,0x01,0x00,0x0C,0x00,0x00,0x08
Sending( 4): 0x65,0x87,0x78,0x56
Recieve( 4): 0x00,0x00,0x00,0x00
Recieve( 4): 0xBE,0xDC,0xCD,0xAB
Recieve( 4): 0x78,0x00,0x08,0x00
Recieve( 4): 0x38,0x00,0x00,0x00
Recieve( 4): 0xB2,0x02,0x3E,0x34
[GENERAL EVENT] 0x1 (Status:-78, Sender:2)
Sending( 4): 0x65,0x87,0x78,0x56
Recieve( 4): 0x00,0x00,0x00,0x00
Recieve( 4): 0xBF,0xDC,0xCD,0xAB
Recieve( 4): 0x66,0x04,0x38,0x00
Recieve( 4): 0x38,0x00,0x00,0x00
Recieve( 8): 0x00,0x00,0x01,0x00,0x0C,0x00,0x2C,0x00
Recieve( 44): 0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0
x05,0x03,0x03,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x33,0x33,0x3B,0x57
CHIP 67108864
MAC 0.0.4.1
PHY 1.5.3.3
NWP 2.0.7.0
ROM 13107
HOST 1.0.0.1
(sl_DevGet:SL_DEVICE_GENERAL_CONFIGURATION_DATE_TIME)
Sending( 4): 0x21,0x43,0x34,0x12
Sending( 4): 0x66,0x84,0x08,0x00
Sending( 8): 0x7C,0x0C,0x01,0x00,0x0B,0x00,0x00,0x08
Sending( 4): 0x65,0x87,0x78,0x56
Recieve( 4): 0xBF,0xDC,0xCD,0xAB
Recieve( 4): 0xBC,0xDC,0xCD,0xAB
Recieve( 4): 0x66,0x04,0x38,0x00
Recieve( 4): 0x38,0x00,0x00,0x00
Recieve( 8): 0x00,0x00,0x01,0x00,0x0B,0x00,0x2C,0x00
Recieve( 44): 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0xDD,0
x07,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
Day 1,Mon 1,Year 2013,Hour 0,Min 0,Sec 4
(sl_WlanProfileDel)
Sending( 4): 0x21,0x43,0x34,0x12
Sending( 4): 0x85,0x8C,0x04,0x00
Sending( 4): 0xFF,0x00,0x00,0x00
Sending( 4): 0x65,0x87,0x78,0x56
Recieve( 4): 0xBC,0xDC,0xCD,0xAB
Recieve( 4): 0xBD,0xDC,0xCD,0xAB
Recieve( 4): 0x78,0x00,0x08,0x00
Recieve( 4): 0x38,0x00,0x00,0x00
Recieve( 4): 0xA2,0x02,0x01,0x00
[GENERAL EVENT] 0x1 (Status:-94, Sender:2)
Sending( 4): 0x65,0x87,0x78,0x56
Recieve( 4): 0x0B,0x00,0x2C,0x00
Recieve( 4): 0xBE,0xDC,0xCD,0xAB
Recieve( 4): 0x85,0x0C,0x08,0x00
Recieve( 4): 0x38,0x00,0x00,0x00
Recieve( 4): 0x00,0x00,0x3E,0x34
(sl_WlanPolicySet)
Sending( 4): 0x21,0x43,0x34,0x12
Sending( 4): 0x86,0x8C,0x04,0x00
Sending( 4): 0x10,0x00,0x00,0x00
Sending( 4): 0x65,0x87,0x78,0x56
Recieve( 4): 0x01,0x00,0x00,0x00
Recieve( 4): 0xBF,0xDC,0xCD,0xAB
Recieve( 4): 0x86,0x0C,0x08,0x00
Recieve( 4): 0x38,0x00,0x00,0x00
Recieve( 4): 0xF9,0xFF,0x3E,0x34
! Fail:-7 !