I created a srio_TX_message function as following. I upload the program to the EVM and I want to check if the message is successfully sent out.
From the spec, I expect the HDP will be reset to all 0s by the port and the ownership will also be set to be 0. But in the debug mode, I did not see the change. Can any of you give some suggestion?
Thanks a lot.
*****************************************************************************************
CSL_SrioBuffDesc tx_buffer_dec0;
void srio_TX_message(Uint32 dst, MessageInf msg)
{
hSrio->regs->QUEUE_TXDMA_HDP[0] = 0;
tx_buffer_dec0.buffPtr = (int )&msg;
tx_buffer_dec0.nextDescPtr = 0;
tx_buffer_dec0.opt1 = CSL_FMK(SRIO_TXBUFFDESC_DEST_ID, dst)|
CSL_FMK(SRIO_TXBUFFDESC_PRI, 1)|
CSL_FMK(SRIO_TXBUFFDESC_TT, 1)|
CSL_FMK(SRIO_TXBUFFDESC_PORT_ID, 3)|
CSL_FMK(SRIO_TXBUFFDESC_SSIZE, CSL_SRIO_TXBUFFDESC_SSIZE_256B)|
CSL_FMK( SRIO_TXBUFFDESC_MAILBOX, 0);
tx_buffer_dec0.opt2 = CSL_FMK( SRIO_TXBUFFDESC_SOP,1 )|
CSL_FMK( SRIO_TXBUFFDESC_EOP,1 )|
CSL_FMK( SRIO_TXBUFFDESC_OWNERSHIP,1 )|
CSL_FMK( SRIO_TXBUFFDESC_EOQ,1 )|
CSL_FMK( SRIO_TXBUFFDESC_TEARDOWN,0 )|
CSL_FMK( SRIO_TXBUFFDESC_RETRY_COUNT,0 )|
CSL_FMK( SRIO_TXBUFFDESC_CC,0 )|
CSL_FMK( SRIO_TXBUFFDESC_MESSAGE_LENGTH,32 );
hSrio->regs->QUEUE_TXDMA_HDP[0] = (Uint32)&tx_buffer_dec0;
}