|
From: Yusuf S. <ys...@gm...> - 2012-04-13 13:36:49
|
Hello Xiaofan,
I've started to use USB Trace Software Tool for debugging. I can trace bulk
in our transactions and success of fail status for all.
By the way, I have tried to receive data from the host. As you remember, I
use bulk.c example and I could read data coming from PC to my device.
But still I am not able to send data to PC. Size of EP1 FIFO Register in
C5515 DSP is 2bytes, so the device sends 64 byte data as an array of 2 byte
data packets.
However in bulk.c program, the data is read by 1byte for each element of
data array(because tmp[] and *bytes variables are defined as char). Do you
think that the problem occurs because of this conflict.? And what do you
recommend to modify bulk.c file?
I would like to quote the data transaction routines that I wrote for device
firmware for your information:
//////////////////////////////
//EP1 interrupt service
//////////////////////////////
//EP1 sending a data package to host
if (ep1_tx == 0x0002)
{
//usbOn=0;
//printf("EP1 TX Interrupt Received./n");
fifo_write_ep1(pBuffer16_ep1,halfpacketSize);
USB_PERI_TXCSR_EP1 |= 0x01; //Set TXPKTRDY (B0 of PERI_TXCSR)
// USB_PERI_TXCSR_EP1 |= 0x10; //SENDSTALL BIT
}
//EP1 receiving a data package from host
if (ep1_rx == 0x0200)
{
fifo_read_ep1(pBuffer16_ep1_read, halfpacketSize);
USB_PERI_TXCSR_EP1 &= 0xFE;
printBuffer (pBuffer16_ep1_read, halfpacketSize);
//usbOn = 0;
}
12 Nisan 2012 18:04 tarihinde Xiaofan Chen <xia...@gm...> yazdı:
> 2012/4/12 Yusuf Sekman <ys...@gm...>:
>> Hello Xiaofan,
>>
>> I have another question about bulk.c example. I am trying to run the
>> example with my firmware code loaded into TI C5515 DSP.
>> When the bulk.c program running, the console says :
>>
>> success: device 0925:1456opened
>> success: set_configuration #1
>> success: claim_interface #0
>> error reading:
>> libusb0-dll:err [_usb_reap_async] reaping request failed,win error:
>> A device attached to the system is not functioning.
>>
>> I simply know that, my firmware code is not working properly, as I
>> understand from the error. But my question is that at which stage of
>> the transfer, my firmware fails?
>> Additionally, I see the error when the device starts to run. For a
>> second run of bulk.c program, I see timeout error at reading stage.
>> Does this imply anything for my situation?
>>
>> I appreciate for your helps. Regards.
>
> I think libusb-win32 may not be the best debug tool for
> your firmware. Do you have access to a HW debugger for
> your device? Do you have access to a USB HW analyzer?
>
> If not, then probably you can make use of the debug
> version of libusb-win32 and then use DebugView
> to post the debug log. Please search the archive
> on how to do that.
>
>
>
> --
> Xiaofan
>
>
------------------------------------------------------------------------------
> For Developers, A Lot Can Happen In A Second.
> Boundary is the first to Know...and Tell You.
> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
> http://p.sf.net/sfu/Boundary-d2dvs2
> _______________________________________________
> Libusb-win32-devel mailing list
> Lib...@li...
> https://lists.sourceforge.net/lists/listinfo/libusb-win32-devel
|