hathach / tinyusb

An open source cross-platform USB stack for embedded system

Home Page:https://www.tinyusb.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MAX3421 (host) and NAK handling

hathach opened this issue · comments

Discussed in #2510

Originally posted by IngHK March 5, 2024
I examined the CPU and USB usage on my host with STM32F401 (ARM M4 CPU 84 MHz) and MAX3421 (SPI 21 MHz).

With a CDC ACM device I saw that the CPU, SPI and USB are mostly busy handling the input stream endpoint.
The endpoint responds with NAK because there is no new data, and handle_xfer_done() in hcd_max3421.c causes the same stream to be repeated immediately (no other stream is pending).

This behavior largely utilizes the CPU with NAK-triggered interrupts.

Wouldn't a delay before a repetition make sense?

fixed by #2543