This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TI2540 using usbfwReadFifo

Hello everyone,


in the last couple of days I have tried my luck reading USB-Input from my computer using the TI2540. This far, I have successfully read input (see the output), but USBCNT0 is always zero.


using:

uint8 * tmpData = osal_mem_alloc(*len);
uint8 ea = halIntLock();
uint8 bytesNow = 10;//USBCNT0;
*len = bytesNow;
USBFW_SELECT_ENDPOINT(endPoint);
usbfwReadFifo(((&USBF0) + (endPoint << 1)), bytesNow, tmpData);
USBFW_ARM_OUT_ENDPOINT();

a few times, gives the following output:

USBCNT0: 0USB_Buffer_0:1
81 7f 2 0 0 1 0 7f 70

USBCNT0: 0USB_Buffer_0:25
7f 75 8 95 3 81 6 c0 c0

USBCNT0: 0USB_Buffer_0:75
1 95 3 81 2 75 5 95 1

USBCNT0: 0USB_Buffer_0:81
1 1 81 7f 2 0 0 1 0

USBCNT0: 0USB_Buffer_0:7f
70 25 7f 75 8 95 3 81 6

USBCNT0: 0USB_Buffer_0:c0
c0 75 1 95 3 81 2 75 5 

Basically I'm just trying to extend usbHidProcessEvents defined in usb_hid to read from the USB Port.


Is there a example how to read form the usb port using the 2540 Dongle?