I've been able to narrow this problem down a bit. It seems that the USB stack (as CDC) fails to transmit. I've traced the problem to the USB_DCI_Validate_Param primitive:
static uint_8 USB_DCI_Validate_Param (
uint_8 ep_num, /* [IN] Endpoint Number */
uint_8 direction, /* [IN] Endpoint direction */
boolean odd /* [IN] Odd or even buffer */
)
{
/* Get bdt index mapped to endpoint number-direction and odd/even buffer */
uint_8 bdt_index = USB_DCI_Get_BDT_Index(ep_num, direction, odd);
if((bdt_index != INVALID_BDT_INDEX) &&
(g_bdt_elem[TRANSFER_INDEX(bdt_index)].len ==
(uint_16)UNINITIALISED_VAL))
{
/* Incase length in bdt_elem is uninitialised return invalid index */
bdt_index = INVALID_BDT_INDEX;
}
return bdt_index;
}
It fails when checking the index length:
(g_bdt_elem[TRANSFER_INDEX(bdt_index)].len ==
(uint_16)UNINITIALISED_VAL)
... to return INVALID_BDT_INDEX.
Any insight you can provide would be appreciated. Thanks.