Hello Community,
I am trying to port the switch example of the using PRUSS and ICSS-EMAC driver.
I am able to send and receive the packets using the PRU ports.
Switch functionality is also achieved. When packet is sent from the host side I am expecting the TX ISR to be called when the packet is sent on the wire.
I am able see the packet in the wireshark. But, I am not getting the TX completion interrupt at the host side.
At host side I am getting RX and Link interrupts as expected.
Below is my pru event to host interrupt map macro.
#define PRUSS_INTC_INITDATA { \
{ PRU_ARM_EVENT0, PRU_ARM_EVENT1, PRU_ARM_EVENT2, PRU_ARM_EVENT3, PRU_ARM_EVENT4, PRU_ARM_EVENT5, PORT1_RX_EOF_EVENT,\
PORT2_RX_EOF_EVENT,MII_LINK0_EVENT,MII_LINK1_EVENT,0xFF}, \
{ {PORT1_RX_EOF_EVENT,CHANNEL0, SYS_EVT_POLARITY_HIGH ,SYS_EVT_TYPE_PULSE},\
{PORT2_RX_EOF_EVENT,CHANNEL1, SYS_EVT_POLARITY_HIGH ,SYS_EVT_TYPE_PULSE}, \
{PRU_ARM_EVENT0,CHANNEL2, SYS_EVT_POLARITY_HIGH ,SYS_EVT_TYPE_PULSE},\
{PRU_ARM_EVENT1, CHANNEL3, SYS_EVT_POLARITY_HIGH ,SYS_EVT_TYPE_PULSE}, \
{PRU_ARM_EVENT2,CHANNEL4, SYS_EVT_POLARITY_HIGH ,SYS_EVT_TYPE_PULSE}, \
{PRU_ARM_EVENT3, CHANNEL5, SYS_EVT_POLARITY_HIGH ,SYS_EVT_TYPE_PULSE}, \
{PRU_ARM_EVENT4, CHANNEL5, SYS_EVT_POLARITY_HIGH ,SYS_EVT_TYPE_PULSE}, \
{MII_LINK0_EVENT, CHANNEL7, SYS_EVT_POLARITY_HIGH ,SYS_EVT_TYPE_PULSE}, \
{MII_LINK1_EVENT, CHANNEL7, SYS_EVT_POLARITY_HIGH ,SYS_EVT_TYPE_PULSE}, \
{PRU_ARM_EVENT5, CHANNEL4, SYS_EVT_POLARITY_HIGH ,SYS_EVT_TYPE_PULSE}, \
{0xFF,0xFF,0xFF,0xFF}}, \
{ {CHANNEL0,PRU0}, {CHANNEL1, PRU1}, {CHANNEL2, PRU_EVTOUT0}, {CHANNEL3, PRU_EVTOUT1}, \
{CHANNEL4, PRU_EVTOUT2}, {CHANNEL5, PRU_EVTOUT3},{CHANNEL6, PRU_EVTOUT4},{CHANNEL7, PRU_EVTOUT6}, {CHANNEL8, PRU_EVTOUT5}\
, {0xFF,0xFF} }, \
(PRU0_HOSTEN_MASK | PRU1_HOSTEN_MASK | PRU_EVTOUT0_HOSTEN_MASK | PRU_EVTOUT1_HOSTEN_MASK \
| PRU_EVTOUT2_HOSTEN_MASK | PRU_EVTOUT3_HOSTEN_MASK| PRU_EVTOUT4_HOSTEN_MASK| PRU_EVTOUT5_HOSTEN_MASK | PRU_EVTOUT6_HOSTEN_MASK|PRU_EVTOUT7_HOSTEN_MASK) /*Enable PRU0/1, PRU_EVTOUT0/1/2 */ \
}
Please, let me know if TX ISR should not being called is expected or I am missing something in this case.