sdGet, not getting all data when debugging

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, tfAteba

Post Reply
User avatar
Korken
Posts: 270
Joined: Wed Apr 02, 2014 4:09 pm
Has thanked: 5 times
Been thanked: 6 times

sdGet, not getting all data when debugging

Post 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!
User avatar
Giovanni
Site Admin
Posts: 14895
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: sdGet, not getting all data when debugging

Post 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
User avatar
Korken
Posts: 270
Joined: Wed Apr 02, 2014 4:09 pm
Has thanked: 5 times
Been thanked: 6 times

Re: sdGet, not getting all data when debugging

Post by Korken »

As I thought then, thanks Giovanni!
Post Reply