Other Parts Discussed in Thread: CC3200
Using a nrf52832 with the CC3100 on a custom board with simplelink sdk1.3.
Used the web AP config process to setup the CC3100 for STA mode using a connection profile.
After restart the CC3100 connects fine to my network using WPA with my network ascii passkey.
As part of the porting process, I ran the sdk 1.3 spi diagnostics and it could be run in a loop and passed all the tests.
Then to further test I read the firmware version but don't know if it is correct or not yet, will research that now.
sl_DevGet(SL_DEVICE_STATUS,&pConfigOpt,&pConfigLen,(uint8_t *)(&statusWlan)); SlVersionFull ver; pConfigLen = sizeof(ver); pConfigOpt = SL_DEVICE_GENERAL_VERSION; sl_DevGet(SL_DEVICE_GENERAL_CONFIGURATION,&pConfigOpt,&pConfigLen,(uint8_t *)(&ver)); printf("CHIP %d\nMAC 31.%d.%d.%d.%d\nPHY %d.%d.%d.%d\nNWP %d.%d.%d.%d\nROM %d\nHOST %d.%d.%d.%d\n", ver.ChipFwAndPhyVersion.ChipId, ver.ChipFwAndPhyVersion.FwVersion[0],ver.ChipFwAndPhyVersion.FwVersion[1], ver.ChipFwAndPhyVersion.FwVersion[2],ver.ChipFwAndPhyVersion.FwVersion[3], ver.ChipFwAndPhyVersion.PhyVersion[0],ver.ChipFwAndPhyVersion.PhyVersion[1], ver.ChipFwAndPhyVersion.PhyVersion[2],ver.ChipFwAndPhyVersion.PhyVersion[3], ver.NwpVersion[0],ver.NwpVersion[1],ver.NwpVersion[2],ver.NwpVersion[3], ver.RomVersion, SL_MAJOR_VERSION_NUM,SL_MINOR_VERSION_NUM,SL_VERSION_NUM,SL_SUB_VERSION_NUM); DevGet Version results: CHIP 0 MAC 31.0.0.0.191181 PHY 108.37.0.32 NWP 191439.0.0.0 ROM 57791 HOST 1.0.1.11
I am trying to determine if the device is connected as a STA and that is when I get hung in the loop.
On the first pass after startup and completing the spi test I then disable the CC3100 and the related interrupts.
Then there is some background work before the CC3100 is enabled again just as it was for the spi diagnostics tests outline below :
nrf_drv_gpiote_in_event_enable(CC_IRQ_PIN, true); sd_nvic_EnableIRQ(GPIOTE_IRQn); nrf_drv_gpiote_out_set(CC_NHIB_PIN); nrf_drv_gpiote_out_set(CC_NRST_PIN); nrf_drv_gpiote_out_set(CC_CS_PIN); nrf_drv_gpiote_out_clear(CC_CS_PIN); nrf_delay_ms(100);
Then since it is already connected and I can browse to CC3100 web on my network I am trying to detect the connection state from the CC3100 using :
while((!IS_CONNECTED(g_Status)) || (!IS_IP_ACQUIRED(g_Status)))
{
_SlNonOsMainLoopTask();
}
This is where it hangs.
Tracing through the process I observed during first pass pF(pValue) calls _SlDrvMsgReadSpawnCtx and then the looping starts. Seems like the requires_restart flag is set but that makes no sense to me and I don't see how to get out of the loop OR how to startup so it does not need a restart.
.
FWIIW here is results from running diagnostics and dev get version in a loop. The most of the fields are consistent (but wrong based on service pack data) with exception of NWP digit changing with each pass. *****Starting Pass : 1 Spi Test Begin Spi Open Passed Device Disable Passed Device Enable Passed Host IRQ Passed Transfer completed. Spi Write Passed Transfer completed. Transfer completed. Transfer completed. Spi Read Passed Spi Init read complete Passed Spi Test Completed *****Starting Pass : 2 Spi Test Begin Spi Open Passed Device Disable Passed Device Enable Passed Host IRQ Passed Transfer completed. Spi Write Passed Transfer completed. Transfer completed. Transfer completed. Spi Read Passed Spi Init read complete Passed Spi Test Completed *****Starting Pass : 3 Spi Test Begin Spi Open Passed Device Disable Passed Device Enable Passed Host IRQ Passed Transfer completed. Spi Write Passed Transfer completed. Transfer completed. Transfer completed. Spi Read Passed Spi Init read complete Passed Spi Test Completed Completed 3 cycles ******* Dev Version Get Pass : 1 ******* CHIP 536936300 MAC 31.64.43.86.0 PHY 18.0.0.0 NWP 0.201457.1.0 ROM 42423 HOST 1.0.1.11 ******************************************** ******* Dev Version Get Pass : 2 ******* CHIP 536936300 MAC 31.64.43.86.0 PHY 18.0.0.0 NWP 0.201457.2.0 ROM 42423 HOST 1.0.1.11 ******************************************** ******* Dev Version Get Pass : 3 ******* CHIP 536936300 MAC 31.64.43.86.0 PHY 18.0.0.0 NWP 0.201457.3.0 ROM 42423 HOST 1.0.1.11 ******************************************** ******* Dev Version Get Pass : 4 ******* CHIP 536936300 MAC 31.64.43.86.0 PHY 18.0.0.0 NWP 0.201457.4.0 ROM 42423 HOST 1.0.1.11 ******************************************** ******* Dev Version Get Pass : 5 ******* CHIP 536936300 MAC 31.64.43.86.0 PHY 18.0.0.0 NWP 0.201457.5.0 ROM 42423 HOST 1.0.1.11 ********************************************
Also seems like whenever the CC3100 does a sl_start(0,0,0,0) the status indicates it requires a restart.
g_bDeviceRestartIsRequired is set and g_SlDeviceStatus ix 0x0200.