Hi,
I am working on people count demo with SDK 2.0.0.4 and IT 2.4.0. I am receiving the data on MATLAB and found out that sometimes header checksum does not produce to zero. It is causing a crash to my application. I had printed the header values which look like this
header = [2 1 4 3 6 5 8 7 4 0 0 2 66 22 10 0 172 48 53 47 10 5 0 0 66 93 1 0 0 0 0 0 78 0 0 0 27 74 0 0 164 1 0 0 182 52 0 0 3 0 163 148]
The header seems right to me but somehow app is breaking after 4-5 seconds if it found checksum not equal to zero. I am checking checksum with below code
h = typecast(uint8(header),'uint16'); a = uint32(sum(h)); b = uint16(sum(typecast(a,'uint16'))); CS = uint16(bitcmp(b));
For the above header, it is producing 3 checksum. Although, header seems right to me. I had also printed decoded values of the header which are as follows
sync headers are: 258, 772, 1286, 1800 version: 33554436 platform 661058 timestamp 792015020 packetLength 1290 frameNumber 89410 subframeNumber 0 chirpMargin 78 frameMargin 18971 uartSentTime 420 trackProcessTime 13494 numTLVs 3 checksum 38051
Moreover, It seems somehow data is being lost while receiving through uart. UART baud rate is 921600. Need a piece of expert advice on it.