On a design using the TAS1020B, I have run into an issue where an unusual number of NAKs are encountered when the TAS1020B is sending the TX data for a FeatureReport. This only happens when the device is connected through a powered USB 2.0 hub. The result is that HID GetFeatureReport takes a long time to respond on the PC.
I believe the issue is with the ROM handler for the HID requests. After my application sets the data pointer for the HID report data and returns back to the ROM, the ROM code appears to be accessing the return data twice. Once for copying the data pointer, and the second to set the UsbRequest status.
Usbhid.c:
UsbRequest.dataPtr = DEV_DATA_PTR;
UsbRequest.status = DEV_DATA_BYTE;
The problem is that both lines are accessing the same union. Pointers are apparently stored as three byte in Keil, with the first byte representing the memory space. 0x00 is DATA, 0x01 is XDATA and 0xFF is IDATA. Anyways, I am passing in an XDATA pointer so the first byte of the pointer is always 0x01. When reading DEV_DATA_BYTE is it essentially reading the first param byte which will always be 1. This means that the UsbRequest.status is always equal to EVENT_ERROR and I presume the ROM behavior is to NAK.
The part I don't understand is why I only see NAKs when connected through a powered hub. Regardless, this seems to be a pretty serious issue. I am referencing the code in the ROM folder of TAS1020B FDK which i assume matches the ROM implementation.