This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC3200有没有不使用操作系统的例程?

Other Parts Discussed in Thread: CC3200, CC3100

本来对WIFI就不太理解,TI提供的例程又是操作系统下使用的,对它的过程调用就很难看了。手里的CC3200板子总想捣鼓一下,苦于没有适当的例程参考。

  • CC3100据说是这样的,你可以去看看

  • 楼主确认手上已经有了这个CC3200的话可以考虑玩玩micropython

    你可以百度一下查找相关资料,有好多网友已经移植好的,Python现在很流行的。

  • 有没有操作系统的例子,参考cc3200-sdk\example\tcp_socket中的例子,有很多都是没有操作系统的

    void main()
    {
    long lRetVal = -1;

    //
    // Board Initialization
    //
    BoardInit();

    //
    // Initialize the uDMA
    //
    UDMAInit();

    //
    // Configure the pinmux settings for the peripherals exercised
    //
    PinMuxConfig();

    //
    // Configuring UART
    //
    InitTerm();

    //
    // Display banner
    //
    DisplayBanner(APPLICATION_NAME);
    InitializeAppVariables();
    //---------------------------并未加入(2) 启动SimpleLink Host-------------------------
    //
    // Start the SimpleLink Host
    //
    // lRetVal = VStartSimpleLinkSpawnTask(SPAWN_TASK_PRIORITY);
    // if(lRetVal < 0)
    // {
    // ERR_PRINT(lRetVal);
    // LOOP_FOREVER();
    // }
    //-----------------------------------------------------------------------
    //
    // Following function configure the device to default state by cleaning
    // the persistent settings stored in NVMEM (viz. connection profiles &
    // policies, power policy etc)
    //
    // Applications may choose to skip this step if the developer is sure
    // that the device is in its default state at start of applicaton
    //
    // Note that all profiles and persistent settings that were done on the
    // device will be lost
    //
    lRetVal = ConfigureSimpleLinkToDefaultState();
    if(lRetVal < 0)
    {
    if (DEVICE_NOT_IN_STATION_MODE == lRetVal)
    UART_PRINT("Failed to configure the device in its default state \n\r");
    LOOP_FOREVER();
    }

    UART_PRINT("Device is configured in default state \n\r");

    //
    // Asumption is that the device is configured in station mode already
    // and it is in its default state
    //
    lRetVal = sl_Start(0, 0, 0);
    if (lRetVal < 0)
    {
    UART_PRINT("Failed to start the device \n\r");
    LOOP_FOREVER();
    }

    UART_PRINT("Device started as STATION \n\r");


    UART_PRINT("Connecting to AP: %s ...\r\n",SSID_NAME);

    // Connecting to WLAN AP - Set with static parameters defined at common.h
    // After this call we will be connected and have IP address
    lRetVal = WlanConnect();
    if(lRetVal < 0)
    {
    UART_PRINT("Connection to AP failed \n\r");
    LOOP_FOREVER();
    }

    UART_PRINT("Connected to AP: %s \n\r",SSID_NAME);

    UART_PRINT("Device IP: %d.%d.%d.%d\n\r\n\r",
    SL_IPV4_BYTE(g_ulIpAddr,3),
    SL_IPV4_BYTE(g_ulIpAddr,2),
    SL_IPV4_BYTE(g_ulIpAddr,1),
    SL_IPV4_BYTE(g_ulIpAddr,0));

    #ifdef USER_INPUT_ENABLE //定义了USER_INPUT_ENABLE
    lRetVal = UserInput();
    if(lRetVal < 0)
    {
    ERR_PRINT(lRetVal);
    LOOP_FOREVER();
    }
    #else //不执行
    lRetVal = BsdTcpClient(PORT_NUM); //建立CC3200-TCP Client并向目的IP及端口号5001发送TCP数据
    if(lRetVal < 0)
    {
    UART_PRINT("TCP Client failed\n\r");
    LOOP_FOREVER();
    }

    lRetVal = BsdTcpServer(PORT_NUM); //建立TCP Server 等待连接并接收数据
    if(lRetVal < 0)
    {
    UART_PRINT("TCP Server failed\n\r");
    LOOP_FOREVER();
    }
    #endif

    UART_PRINT("Exiting Application ...\n\r");

    //
    // power of the Network processor
    //
    lRetVal = sl_Stop(SL_STOP_TIMEOUT);

    while (1)
    {
    _SlNonOsMainLoopTask();
    }
    }

  • 谢谢你!

    在这里也一并谢谢楼上各位!

  • 您可以参考TI wiki页面的说明 http://processors.wiki.ti.com/index.php/CC32xx_SDK_Sample_Applications

    很多都是Non-OS的