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.

EVM6678l - POST - emac loopback test

Guru 10750 points

Hi,

I'm going over the EVM6678l POST emac loopback test, on the receive packet side in the function "hwQmQueuePop (file qm.c), reading qm register D -  "DEVICE_REG32_R (DEVICE_QM_MANAGER_QUEUES_BASE + QM_REG_QUEUE_REGD(qnum));" for popping a packet from the queue returns "0" which means that the queue is empty and everything is going well saying that the test passes, why is that? am I missing something?

I'm using mcsdk_2_00_04_16,

Thanks,

HR

  • Hi,

    Reading QM register D will get the next available QM packet descriptor pointer, if the queue is empty, the read will return NULL. POST is checking the packet descriptor pointer in targetMacRcv() when calling hwQmQueuePop (DEVICE_QM_RCV_Q), if it is NULL it will report that the EMAC loopback test failed, otherwise it will report the test passed. You may set a breakpoint in targetMacRcv() to check if you get the loopbacked packet or not.

    Regards,

    Hao.

  • Hi Hao,

    This is the place I was checking, I removed the sending Eth. packet line "cpmac_drv_send (&nDevice, test_buf, POST_EMAC_TEST_PKT_LENGTH+14) < 0" and the test is passing, I'm running post test from mcsdk_2_00_04_16, using CCS5.1,

    BR,

    HR

  • Hi Hao,

    Please note that I have checked the same with the new MCSDK (2_00_05_17) and the issue is the same, which means that the Eth loopback test passes even when removing the cpmac_drv_send(..) line,

    Thanks,

    HR