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,把scan_policy和uart_demo的例程结合在一块为啥没法正常运行



把scan_policy和uart_demo的例程结合在一块,用uartputchar输出netEntries[].rssi,为啥烧到flash里无法运行呢?帮忙看看程序吧,我只改动了main.c和pinmux.c

  • 你不需要在主程序里面调用UARTputchar的函数啊,在scan_policy里面已经有初始化UART的操作,用UART_PRINT可以直接串口输出的。

    另外你pinmux改了什么地方呢?

    你可以不改动pinmux,也不需要加uart_demp程序进去,你就在scan_policy 的源程序里面WlanScan()函数的里面加入下面的语句:

    /* put a break point here and check netEntries[] value for scan ssid list */
    for(i=0; i< WLAN_SCAN_COUNT; i++)
    {
    UART_PRINT("rssi:%d, ssid:%s\n\r",netEntries[i].rssi,netEntries[i].ssid);
    }
    //
    // get scan results - 4 transactions of 5 entries
    //

    注意加入的地方!

    谢谢

  •     //int i;
        //for(i=0; i< WLAN_SCAN_COUNT; i++)
          //{
            UART_PRINT("Unable to retreive the network list\n\r");
            UART_PRINT("rssi:%d, ssid:%s\n\r",netEntries[0].rssi,netEntries[0].ssid);
          //}

    串口助手显示不出来呀,加入 UART_PRINT("Unable to retreive the network list\n\r");后也显示不出Unable to retreive the network list\n\r呢?你那边串口助手有显示吗?大哥

  • chengchong,

      能啊,这个是我自己试过的程序。你还是串口没打印输出?

    scan_policy()例程运行时的启动信息也是出现不了?

    谢谢