Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4467

General discussion • RP2040 USB endpoint 2(Except 0) interrupts are not triggered

$
0
0
I have a very strange bug.

I performed endpoint initialization during the USB initialization and reset process.

It looks like this :

Code:

    /* endpoint 1 */    usb_dpram->ep_ctrl[0].in = ( EP_CTRL_ENABLE_BITS                               | EP_CTRL_INTERRUPT_PER_BUFFER                               | (USB_TRANSFER_TYPE_BULK << EP_CTRL_BUFFER_TYPE_LSB)                               | 0x180 );    /* endpoint 2 */    usb_dpram->ep_ctrl[1].out = ( EP_CTRL_ENABLE_BITS                               | EP_CTRL_INTERRUPT_PER_BUFFER                               | (USB_TRANSFER_TYPE_BULK << EP_CTRL_BUFFER_TYPE_LSB)                               | 0x240 );
But the endpoint 2 request of the USB bus is always NAK, usb_hw->buf_status is always 0.

The Interrupt of Endporint 0 is fine.

I haven't been able to find out what causes this phenomenon.

Statistics: Posted by hangang_2 — Sun Mar 17, 2024 12:59 am — Replies 0 — Views 14



Viewing all articles
Browse latest Browse all 4467

Trending Articles