Page 1 of 1

sdGet, not getting all data when debugging

Posted: Mon Jan 18, 2016 10:59 am
by Korken
Hi all,

I have a small thing happening that I am not 100% sure why it is happening.
I have a serial parser I am debugging and to do this I send a full packet I want to debug with a breakpoint on the parsing function.

What happens is that the first 2 bytes of the message get caught.
What I think it is:
As the the debugger stops after reading the first byte, the second is put in the buffer and then the rest are discarded as the buffer has not been emptied.

Is this the correct analysis?
If so, is there a recommended way yo check this without chopping up the incoming message? Or is that a must?

Thanks!

Re: sdGet, not getting all data when debugging

Posted: Mon Jan 18, 2016 11:08 am
by Giovanni
Hi,

If the execution is stopped incoming chars are not buffered because the CPU is not serving interrupts. You also probably get a overflow condition.

Giovanni

Re: sdGet, not getting all data when debugging

Posted: Mon Jan 18, 2016 7:26 pm
by Korken
As I thought then, thanks Giovanni!