Skip to main content
Associate
December 12, 2025
Question

STM32H7 sends USB NAK when data sent from host (PC)

  • December 12, 2025
  • 1 reply
  • 375 views

Hi, 
I use STM32H7 with STCUBE 11.1.
I use RNDIS module  usbd_cdc_rndis.h to communicate with a PC.

Sometimes when the PC sends a frame the STM32 replies with NAK, here is the sequence that repeats:

SYNC
PID OUT
Address
CRC
EOP

SYNC
PID DATA0
data 30 bytes
CRC
EOP

SYNC
PID NAK
EOP

What might be the issue? Can I change the USB interval (CDC_RNDIS_FS_BINTERVAL)?


BR
Jonas



1 reply

Technical Moderator
December 15, 2025

Hi @Jonas_A 

NAK is a normal USB handshake response that tells the host "I am not ready to receive data right now, please retry later." not necessarily an issue.
Would you specify the issue in application layer ? Do you use reference board? H735 DK? Do you reproduce using the example firmware? 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.Best regards,FBL
Jonas_AAuthor
Associate
December 16, 2025

When this happens the PC resends the USB frame infinitely because the STM32 always sends NAK.
Do you know how to troubleshoot this? I use a j-link so I can set breakpoints etc.,  do you know which function that set the reply to NAK?
The attached .csv file is a log from the logic analyzer that I use.
The first packet that is responded with a NAK starts on line 112095 (byte: 0x40)