Skip to main content
Erenburg.Evgeny
Associate III
January 16, 2019
Solved

Receive data on VCP

  • January 16, 2019
  • 3 replies
  • 865 views

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?

This topic has been closed for replies.
Best answer by Erenburg.Evgeny

I found the problem. Terminal sends too slow.

3 replies

Pavel A.
January 17, 2019

> I see

> Receive_Buffer[0] = 1

> Receive_Buffer[0] = 2

Where?

-- pa

Erenburg.Evgeny
Associate III
January 17, 2019

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

Erenburg.Evgeny
Erenburg.EvgenyAuthorBest answer
Associate III
January 17, 2019

I found the problem. Terminal sends too slow.