Hi,
(1) For each queue, what is the maximum number of descriptor that can be enqueued into the queue ?
(2) I am enqueing 4 descriptors into RX Submit Queue 0 as below, it does not really work as expected. Do I need a delay between each write to the CTRLD[N] register ?
The CPPI DMA drviver can receive data, and generate interrupt as expected. In the ISR, based on PEND0 register, the driver reads the corresponding RX Completion (return) queue.
The issue is the descriptor dequeued from the retun queue is always the same descriptor and is the first descriptor (&descriptor[0] ) that I push into the queue. That's what I meant not working as expected. For second RX, I am expecting &descriptor[1] to be dequeued from the retun queue, and so forth.
Any comment ?
rgds,
kc Wong
UINT32 queue = RX_SUBMIT_QUEUE_0;
*((volatile UINT32 *)(USB_OTG_REG_BASE+QMGR_CTRLD(queue))) = ((UINT32)&descriptor[0] | 0x02);
*((volatile UINT32 *)(USB_OTG_REG_BASE+QMGR_CTRLD(queue))) = ((UINT32)&descriptor[1] | 0x02);
*((volatile UINT32 *)(USB_OTG_REG_BASE+QMGR_CTRLD(queue))) = ((UINT32)&descriptor[2] | 0x02);
*((volatile UINT32 *)(USB_OTG_REG_BASE+QMGR_CTRLD(queue))) = ((UINT32)&descriptor[3] | 0x02);