MAX3421 (host) and NAK handling
hathach opened this issue · comments
Ha Thach commented
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?