cancel
Showing results for 
Search instead for 
Did you mean: 

Receive data on VCP

I receive some data from a terminal. Say I send 1234 on the terminal.

I set a break point on

void EP3_OUT_Callback(void)

{

 packet_receive = 1;

 Receive_length = GetEPRxCount(ENDP3);

 PMAToUserBufferCopy((unsigned char*)Receive_Buffer, ENDP3_RXADDR, Receive_length);

}

But I see that every char copied on the first index of the buffer.

I see

Receive_Buffer[0] = 1

Receive_Buffer[0] = 2

Receive_Buffer[0] = 3

Receive_Buffer[0] = 4

Also in PMAToUserBufferCopy I see the first argument's address is incremented.

What do I miss?

1 ACCEPTED SOLUTION

Accepted Solutions

I found the problem. Terminal sends too slow.

View solution in original post

3 REPLIES 3
Pavel A.
Evangelist III

> I see

> Receive_Buffer[0] = 1

> Receive_Buffer[0] = 2

Where?

-- pa

I program in IAR. I set a break point after PMAToUserBufferCopy((unsigned char*)Receive_Buffer, ENDP3_RXADDR, Receive_length); and see Receive_Buffer.

I found the problem. Terminal sends too slow.