|
Re: Usage of serial port on cRio
Of course it looks correct (at least before it crashed). Imagine the buffer pointer is pointing to some random memory, so the Read method will start copying the bytes to the random location. Your print loop will also print the bytes from this random location. But what is this random location anyway? What if the random location contains the return address of your function (which is very likely)? So at the end of your function when you are returning to the caller, since the return address is trashed, you returned to la la land, thus crashed.
__________________
Last edited by mikets : 08-02-2012 at 14:57.
|