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.

AM2732: 使用am2732SDK里example/cbuff工程,但是没有LVDS信号输出

Part Number: AM2732


在SDK/example/cbuff工程上做了一定修改,使之可以一直用LVDS发送数据,但是用示波器测量LVDS接口,也就是EVM板上的J7,发现没有任何信号输出。手上没有DCA采数板,无法进行其他验证方式。

问题1:是不是cbuff工程成功运行,理论上就会有LVDS信号输出?

问题2:如果不是,我还需要进行哪些步骤?

  • 主要修改了cbuff的传输次数,原代码中cbuff只传输一次,然后就关闭了。我将CBUFF_activateSession函数和CBUFF_deactivateSession函数放在死循环中,这样am2732就可以一直让cbuff发送数据了。具体修改情况如插入代码,在cbuff_sw_trigger.c文件270行之前(也就是插入代码的第一行)只加入了gCBUFFSwTriggerFrameDoneCounter_last变量的定义,其他无修改,其他文件也无修改。修改的地方是1.加入了gCBUFFSwTriggerFrameDoneCounter_last变量,通过它和gCBUFFSwTriggerFrameDoneCounter是否相等判断本次传输是否完成。2.屏蔽了后面的cbuff_close等程序结束关闭代码。

    /* Create the Session: */
        sessionHandle = CBUFF_createSession (cbuffHandle, &sessionCfg, &errCode);
        if (sessionHandle == NULL)
        {
            DebugP_log ("Error: Unable to create the session [Error code %d]\r\n", errCode);
        }
        while(1)
        {
            /* Activate the session: */
            if (CBUFF_activateSession (sessionHandle, &errCode) < 0)
            {
                DebugP_log ("Error: Unable to activate the session [Error code %d]\r\n", errCode);
            }
            while (gCBUFFSwTriggerFrameDoneCounter == gCBUFFSwTriggerFrameDoneCounter_last)
            {
                DebugP_log("waiting for frameDone interrupt : %d\r\n", gCBUFFSwTriggerFrameDoneCounter);
                ClockP_usleep(10 * 1000);
            }
    
            DebugP_log("Received frameDone interrupt : %d\r\n", gCBUFFSwTriggerFrameDoneCounter);
            gCBUFFSwTriggerFrameDoneCounter_last = gCBUFFSwTriggerFrameDoneCounter;
    
            /* Deactivate the session: */
            if (CBUFF_deactivateSession (sessionHandle, &errCode) < 0)
            {
                DebugP_log ("Error: Unable to deactivate the session [Error code %d]\r\n", errCode);
            }
        }
    
        // /* Delete the session: */
        // if (CBUFF_close (sessionHandle, &errCode) < 0)
        // {
        //     DebugP_log ("Error: Unable to delete the session [Error code %d]\r\n", errCode);
        // }
    
        // if(testStatus == SystemP_SUCCESS)
        // {
        //     DebugP_log("[CBUFF] SW Trigger Test Completed!!\r\n");
        //     DebugP_log("All tests have passed!!\r\n");
        // }
        // else
        // {
        //     DebugP_log("Some tests have failed!!\r\n");
        // }
    
    	// Board_driversClose();
        // Drivers_close();
    
        // return;

  • 没修改之前由于cbuff只传输一次,怕检测不到信号,所以未作测试。