This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM3352: How to enable continuous data toggle in AM335x PDK (RTOS)

Part Number: AM3352

Hello,

I am trying to enable to continuous data toggle for an interrupt endpoint in the AM335x RTOS PDK, but am not sure if I am doing it right.

In the USBDevEndpointConfigSet function in musb.c, I have added the following to the portion of code that configures device IN (USB_EP_DEV_IN) endpoints:

        /* Enable continuous data toggle in interrupt mode. */
        if((ulFlags & USB_EP_MODE_INT) == USB_EP_MODE_INT)
        {
            HWREGH(ulBase + EP_OFFSET(ulEndpoint) + USB_O_TXCSRL1) |= MUSB_TXCSR_FRCDATATOG;
        }

Can anyone confirm if this is correct? musb being behind an NDA is making this more difficult than it seems like it should be since I am not able to just look it up in their reference manual/datasheet.

  • I'm sorry, the title should have mentioned that this was for the USB module in device mode.

    Also for reference, I am reading section 16.2.8.1.3 in the AM335x Technical Reference Manual which states;

    Tx endpoints in the USB controller have one feature for Interrupt IN transactions that they do not support
    in Bulk IN transactions. In Interrupt IN transactions, the endpoints support continuous toggle of the data
    toggle bit.
    This feature is enabled by setting the FRCDATATOG bit in the PERI_TXCSR register (bit 11). When this
    bit is set, the controller will consider the packet as having been successfully sent and toggle the data bit
    for the endpoint, regardless of whether an ACK was received from the host.

  • Hi Matt,

    Thanks for your query.

    Please refer to the following E2E FAQ for guidance.

    Best Regards

    Ashwani