Skip to content

Commit 974fb04

Browse files
committed
fix(tinyusb): fix zero-length packet handling
When the host sent a zero-length packet, the device received the same data twice. This caused stub not loading correctly with esptool on MacOS, because MacOS sends the zero-length packet more ofter than other OSes.
1 parent 2d4d1fa commit 974fb04

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

main/public_include/tusb_config.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ extern "C" {
2525

2626
#define CFG_TUD_ENDPOINT0_SIZE 64
2727

28+
// DMA Mode has a priority over Slave/IRQ mode and will be used if hardware supports it
29+
// Slave/IRQ mode has issue with handling zero length packets
30+
#define CFG_TUD_DWC2_DMA_ENABLE 1 // Enable DMA
31+
2832
#define CFG_TUD_CDC 1
2933
#define CFG_TUD_CDC_RX_BUFSIZE 64
3034
#define CFG_TUD_CDC_TX_BUFSIZE 64

0 commit comments

Comments
 (0)