Hi Edwin,
thank you for the prompt response!
I am fully aware of the NYET/PING mechanism and I know, that if the next buffer in not initialized properly, the device will respond to the host with a NYET.
To be more precise in the original post, I should have written "both endpoint out buffers...".
I would like to know, if you would agree, that if you have both buffers (2048 bytes for each buffer, 512 bytes per BULK packet) completely activated/primed for the transfer, before the BULK OUT transfer starts, then at least 8 BULK OUT packets should be able to be sent from the host to the device without receiving a NYET response.
But in reality in this scenario, I get a NYET response already after 4 BULK OUT packets, even if both buffers are completely primed for the transfer. The initialization code for both buffers is triggered by the control transfer that is visible in the screenshot from the USB analyzer in the original post.
Do you have a test firmware for USB HS performance, that does nothing but reinitializing a buffer after the transfer in this buffer is completed?
I did not use any part of CMSIS or the SDK libraries. Instead I wrote my own HAL and USB stack from scratch in Zig.
The code, which is triggered by the control transfer before the EP2 OUT transfer is started, looks like this:
```zig
...
ep2.out.initEpBuffer0();
ep2.out.initEpBuffer1();
...
```
EP2 OUT Module code for initializing the buffers:
```zig
pub fn initEpBuffer0() void {
EndPoint.ep_cmd_stat_list.ep2_out_buf_0.buffer_address_offset = EndPoint.ep_cmd_stat_address_offset_ep2_out_buf0;
EndPoint.ep_cmd_stat_list.ep2_out_buf_0.buffer_nbytes = config.LinkerConfig.usb_hs_ep2_out_buffer_size;
EndPoint.ep_cmd_stat_list.ep2_out_buf_0.active = .buffer_active;
}
pub fn initEpBuffer1() void {
EndPoint.ep_cmd_stat_list.ep2_out_buf_1.buffer_address_offset = EndPoint.ep_cmd_stat_address_offset_ep2_out_buf1;
EndPoint.ep_cmd_stat_list.ep2_out_buf_1.buffer_nbytes = config.LinkerConfig.usb_hs_ep2_out_buffer_size;
EndPoint.ep_cmd_stat_list.ep2_out_buf_1.active = .buffer_active;
}
```
Looking forward to your feedback!