cancel
Showing results for 
Search instead for 
Did you mean: 

USB communication

kucel
Associate
Posted on July 10, 2011 at 19:37

Hi

I use UM0424  ST library to connect my STM32F103 with computer. I want send 3 bytes data (normally they send 2 bytes from ADC). I change wMaxPacketSize in ''Descriptor of Custom HID interface'' but when I try send 3 bytes instead 2 my communication hangs.

This is my send code:

if(PrevXferComplete)

{  

Send_Buffer_[0] = 0x07;  

Send_Buffer_[1] = high_sample;

Send_Buffer_[2] = low_sample;

UserToPMABufferCopy(Send_Buffer_, ENDP1_TXADDR, 3);

    SetEPTxCount(ENDP1, 3);

    SetEPTxValid(ENDP1); 

PrevXferComplete=0;

}

could someone help me with this problem ?

Kamil

#stm32-usb-hid-communication
0 REPLIES 0