Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ecbca9d

Browse files
committedMar 22, 2025·
drivers: udc_rpi_pico: fix restart of the new transaction
At high throughput, the controller sometimes fails to start a new transaction. Clearing the corresponding endpoint bit in the BUFF_STATUS completion register before initiating a new transaction solves this problem. Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
1 parent 81bef92 commit ecbca9d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎drivers/usb/udc/udc_rpi_pico.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,7 @@ static void rpi_pico_handle_buff_status(const struct device *dev)
653653
continue;
654654
}
655655

656+
rpi_pico_bit_clr((mm_reg_t)&base->buf_status, BIT(i));
656657
/* Odd bits in the register correspond to OUT endpoints */
657658
if (i & 1U) {
658659
ep = USB_EP_DIR_OUT | (i >> 1U);
@@ -662,7 +663,6 @@ static void rpi_pico_handle_buff_status(const struct device *dev)
662663
rpi_pico_handle_buff_status_in(dev, ep);
663664
}
664665

665-
rpi_pico_bit_clr((mm_reg_t)&base->buf_status, BIT(i));
666666
buf_status &= ~BIT(i);
667667
}
668668
}

0 commit comments

Comments
 (0)
Please sign in to comment.