Hi All,
I'm unable to get a USB transaction to complete. The basic scenario is this:
I am running a number of self-tests on our device (on the 5509a chip). At the conclusion of each test or test stage, I send the results to the host, a Windows PC. These results are sent via USB using DMA through EP4 in, configured as an interrupt endpoint. **All these transactions are successful, save one.** Some (possibly) pertinent notes:
- We do not use CSL, but most of the CSL USB functions are compiled from source
- I call USB_postTransaction, which calls USB_procDmaTransaction, which fails on the last instruction: USB_DMA->DCTL = dma_ctrl_mask; dma_ctrl_mask is equal to 0x0001 -- it is simply setting the GO bit
- The EP4 in context registers before a transaction (successful or not) look like this: DSIZ set to 0x000C (12 bytes to send) and DADL and DADH set to the (byte) address of the destination buffer; all others are 0x0000
- After a successful transaction, the DCT register reads 0x000C
- After an unsuccessful transaction, the DCT register remains 0 and DCTL reads 0x0201; bit 9 is reserved and bit 0 is the GO bit, indicating that the transaction has not completed
I'm rather new to embedded programming. I'm happy to oblige with any additional information any of you more experienced hands may request. I'll add a couple of points that may be of interest.
- The transaction that fails follows the most complex of the self-tests. I've isolated two lines within the self-test which, when commented out, will allow the transaction to complete. They are:
*DMA5_CCR |= DMAn_CCR_EN_MASK; (sets EN bit of DMA channel 5 Control Register)
*MCBSP2_SPCR2 |= MCBSP_SPCR2_FRST_MASK; (sets FRST bit of McBSP 2 Serial Port Control Register 2)
- I have scanned all the USB registers for clues but nothing has caught my eye.
- No subsequent USB transactions will succeed.
Thanks in advance.
Dave.