USB NYET response despite of free buffer (LPC55S69 USB1 HS Controller)

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

USB NYET response despite of free buffer (LPC55S69 USB1 HS Controller)

307 次查看
pettel
Contributor II

I'm using EP2 OUT with double buffering.

  • Buf0 and Buf1 have 2048 bytes each
  • EP2 OUT is a bulk endpoint with a maximum packet size of 512 bytes

Both endpoints (EP2_OUT_BUF0, EP2_OUT_BUF1) are initialized with 2048 N-bytes and the endpoints are set to active.

Expectation: without further interaction 4096 bytes should be received, without a NYET response.

 

Observed behaviour: after Buf0 is full a NYET response is transmitted instead of an ACK response, despite Buf1 beeing completely empty and active.

Bild 2025-10-07 at 01.17.49.png

This behaviour is especially detrimental to performance if you work with 512 byte buffers for Buf0 and Buf1, because in this case a NYET response is transmitted after every OUT transmission from the host, which requires an unnecessary USB-Ping and reduces throughput.

Is there a workaround or is this a hardware bug?

  

标记 (2)
0 项奖励
回复
2 回复数

214 次查看
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @pettel,

This is by design of the USB stack implementation of the SDK. As you can see on a comment on "PERI_USBHSD.h": 

DATA_PENDING - As long as this bit is set to one and LPM supported bit is set to one, HW will
* return a NYET handshake on every LPM token it receives. If LPM supported bit is set to one and
* this bit is zero, HW will return an ACK handshake on every LPM token it receives. If SW has
* still data pending and LPM is supported, it must set this bit to 1.

 

0 项奖励
回复

184 次查看
pettel
Contributor II

Hi @EdwinHz ,

 

this topic is not about LPM tokens. It's about sending user data from the USB host to EP2 of the LPC55S69. Link Power Management and the associated transactions are a completely separate topic.

0 项奖励
回复
%3CLINGO-SUB%20id%3D%22lingo-sub-2181199%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EUSB%20NYET%20%E5%93%8D%E5%BA%94%EF%BC%8C%E5%B0%BD%E7%AE%A1%E6%9C%89%E7%A9%BA%E9%97%B2%E7%BC%93%E5%86%B2%E5%8C%BA%EF%BC%88LPC55S69%20USB1%20HS%20%E6%8E%A7%E5%88%B6%E5%99%A8%EF%BC%89%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2181199%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E6%88%91%E4%BD%BF%E7%94%A8%E7%9A%84%E6%98%AF%E5%8F%8C%E7%BC%93%E5%86%B2%20EP2%20OUT%E3%80%82%3C%2FP%3E%3CUL%3E%3CLI%3EBuf0%20%E5%92%8C%20Buf1%20%E5%90%84%E6%9C%89%202048%20%E5%AD%97%E8%8A%82%3C%2FLI%3E%3CLI%3EEP2%20OUT%20%E6%98%AF%E4%B8%80%E4%B8%AA%E6%89%B9%E9%87%8F%E7%AB%AF%E7%82%B9%EF%BC%8C%E6%9C%80%E5%A4%A7%E6%95%B0%E6%8D%AE%E5%8C%85%E5%A4%A7%E5%B0%8F%E4%B8%BA%20512%20%E5%AD%97%E8%8A%82%3C%2FLI%3E%3C%2FUL%3E%3CP%3E%E4%B8%A4%E4%B8%AA%E7%AB%AF%E7%82%B9%EF%BC%88EP2_OUT_BUF0%E3%80%81EP2_OUT_BUF1%EF%BC%89%E5%9D%87%E4%BD%BF%E7%94%A8%202048%20%E4%B8%AA%20N%20%E5%AD%97%E8%8A%82%E5%88%9D%E5%A7%8B%E5%8C%96%EF%BC%8C%E7%AB%AF%E7%82%B9%E8%AE%BE%E7%BD%AE%E4%B8%BA%E6%B4%BB%E5%8A%A8%E7%8A%B6%E6%80%81%E3%80%82%3C%2FP%3E%3CP%3E%E6%9C%9F%E6%9C%9B%EF%BC%9A%E5%9C%A8%E6%B2%A1%E6%9C%89%E8%BF%9B%E4%B8%80%E6%AD%A5%E4%BA%A4%E4%BA%92%E7%9A%84%E6%83%85%E5%86%B5%E4%B8%8B%EF%BC%8C%E5%BA%94%E6%8E%A5%E6%94%B6%204096%20%E5%AD%97%E8%8A%82%EF%BC%8C%E6%B2%A1%E6%9C%89%20NYET%20%E5%93%8D%E5%BA%94%E3%80%82%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%E8%A7%82%E5%AF%9F%E5%88%B0%E7%9A%84%E8%A1%8C%E4%B8%BA%EF%BC%9A%E5%9C%A8%20Buf0%20%E5%B7%B2%E6%BB%A1%E5%90%8E%EF%BC%8C%E5%B0%BD%E7%AE%A1%20Buf1%20%E5%B7%B2%E5%AE%8C%E5%85%A8%E6%B8%85%E7%A9%BA%E5%B9%B6%E5%A4%84%E4%BA%8E%E6%B4%BB%E5%8A%A8%E7%8A%B6%E6%80%81%EF%BC%8C%E4%BD%86%E4%BC%A0%E8%BE%93%E7%9A%84%E6%98%AF%20NYET%20%E5%93%8D%E5%BA%94%EF%BC%8C%E8%80%8C%E4%B8%8D%E6%98%AF%20ACK%20%E5%93%8D%E5%BA%94%E3%80%82%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Bild%202025-10-07%20at%2001.17.49.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Bild%202025-10-07%20at%2001.17.49.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F359753i9A2043D029B44F6A%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Bild%202025-10-07%20at%2001.17.49.png%22%20alt%3D%22Bild%202025-10-07%20at%2001.17.49.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%E5%A6%82%E6%9E%9C%E6%82%A8%E4%BD%BF%E7%94%A8%20Buf0%20%E5%92%8C%20Buf1%20%E7%9A%84%20512%20%E5%AD%97%E8%8A%82%E7%BC%93%E5%86%B2%E5%8C%BA%EF%BC%8C%E8%BF%99%E7%A7%8D%E8%A1%8C%E4%B8%BA%E5%B0%A4%E5%85%B6%E4%B8%8D%E5%88%A9%E4%BA%8E%E6%80%A7%E8%83%BD%EF%BC%8C%E5%9B%A0%E4%B8%BA%E5%9C%A8%E8%BF%99%E7%A7%8D%E6%83%85%E5%86%B5%E4%B8%8B%EF%BC%8C%E6%AF%8F%E6%AC%A1%E4%BB%8E%E4%B8%BB%E6%9C%BA%E8%BF%9B%E8%A1%8C%E8%BE%93%E5%87%BA%E4%BC%A0%E8%BE%93%E5%90%8E%E9%83%BD%E4%BC%9A%E4%BC%A0%E8%BE%93%20NYET%20%E5%93%8D%E5%BA%94%EF%BC%8C%E8%BF%99%E9%9C%80%E8%A6%81%E4%B8%8D%E5%BF%85%E8%A6%81%E7%9A%84%20USB-Ping%20%E5%B9%B6%E9%99%8D%E4%BD%8E%E5%90%9E%E5%90%90%E9%87%8F%E3%80%82%3C%2FP%3E%3CP%3E%E6%98%AF%E5%90%A6%E6%9C%89%E8%A7%A3%E5%86%B3%E6%96%B9%E6%B3%95%EF%BC%8C%E6%88%96%E8%80%85%E8%BF%99%E6%98%AF%E7%A1%AC%E4%BB%B6%E6%95%85%E9%9A%9C%EF%BC%9F%3CBR%20%2F%3E%3CBR%20%2F%3E%20%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2187498%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20USB%20NYET%20response%20despite%20of%20free%20buffer%20(LPC55S69%20USB1%20HS%20Controller)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2187498%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E4%BD%A0%E5%A5%BD%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F186731%22%20target%3D%22_blank%22%3E%40EdwinHz%3C%2FA%3E%E3%80%81%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%E6%9C%AC%E4%B8%BB%E9%A2%98%E4%B8%8E%20LPM%20%E4%BB%A4%E7%89%8C%E6%97%A0%E5%85%B3%E3%80%82%E8%BF%99%E6%98%AF%E5%85%B3%E4%BA%8E%E4%BB%8E%20USB%20%E4%B8%BB%E6%9C%BA%E5%90%91%20LPC55S69%20%E7%9A%84%20EP2%20%E5%8F%91%E9%80%81%E7%94%A8%E6%88%B7%E6%95%B0%E6%8D%AE%E3%80%82%E9%93%BE%E6%8E%A5%E7%94%B5%E6%BA%90%E7%AE%A1%E7%90%86%E5%8D%95%E5%85%83%E5%92%8C%E7%9B%B8%E5%85%B3%E4%BA%8B%E5%8A%A1%E6%98%AF%E4%B8%80%E4%B8%AA%E5%AE%8C%E5%85%A8%E7%8B%AC%E7%AB%8B%E7%9A%84%E4%B8%BB%E9%A2%98%E3%80%82%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2186049%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20USB%20NYET%20response%20despite%20of%20free%20buffer%20(LPC55S69%20USB1%20HS%20Controller)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2186049%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E5%97%A8%EF%BC%8C%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F244769%22%20target%3D%22_blank%22%3E%40pettel%3C%2FA%3E%E3%80%81%3C%2FP%3E%0A%3CP%3E%E8%BF%99%E6%98%AF%E7%94%B1%20SDK%20%E7%9A%84%20USB%20%E6%A0%88%E8%AE%BE%E8%AE%A1%E5%AE%9E%E7%8E%B0%E7%9A%84%E3%80%82%E6%AD%A3%E5%A6%82%E6%82%A8%E5%9C%A8%22PERI_USBHSD.h%22%20%E4%B8%8A%E7%9A%84%E6%B3%A8%E9%87%8A%E6%89%80%E7%A4%BA%EF%BC%9A%20%3C%2FP%3E%0A%3CPRE%20translate%3D%22no%22%3EDATA_PENDING%20-%20As%20long%20as%20this%20bit%20is%20set%20to%20one%20and%20LPM%20supported%20bit%20is%20set%20to%20one%2C%20HW%20will%3CBR%20%2F%3E*%20return%20a%20NYET%20handshake%20on%20every%20LPM%20token%20it%20receives.%20If%20LPM%20supported%20bit%20is%20set%20to%20one%20and%3CBR%20%2F%3E*%20this%20bit%20is%20zero%2C%20HW%20will%20return%20an%20ACK%20handshake%20on%20every%20LPM%20token%20it%20receives.%20If%20SW%20has%3CBR%20%2F%3E*%20still%20data%20pending%20and%20LPM%20is%20supported%2C%20it%20must%20set%20this%20bit%20to%201.%3C%2FPRE%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E