This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

IWR6843AOP: Overhead 3D People Counter: UART data length mismatch

Part Number: IWR6843AOP

Hello,

I am trying to port an application that used IWR6843AOP ES1.0 to IWR6843AOP ES2.0.

The application is used for people counting.

The old version for ES1.0 uses the source code from this project: dev.ti.com/.../Overhead_People_Tracking_and_Stance_Detection_users_guide.html

The new version for ES2.0 uses the source code from this project: dev.ti.com/.../overhead_3d_people_tracking_user_guide.html

The ES2.0 device has been flashed with the precompiled binary in radar_toolbox_1_00_00_26/source/ti/examples/People_Counting/overhead_3d_people_counting/prebuilt_binaries/default/overhead_3d_people_count_demo_default.bin

I am having issues decoding the UART data that I receive from the sensor.
It seems the software on the board occasionally miscalculate the length of the packet.
Sometimes the length in the header is wrong, while other times the length of a TLV is wrong.

Here is an example of 1000 bytes that I have received from the device:

00000000: 0201 0403 0605 0807 0400 0503 1101 0000 ................
00000010: 4368 0a00 fa04 0000 0000 0000 0500 0000 Ch..............
00000020: 0500 0000 0000 0000 fc03 0000 3c00 0000 ............<...
00000030: 0ad7 233c 0ad7 233c f7cc 9239 6f12 8339 ..#<..#<...9o..9
00000040: 0ad7 233d 5401 9bff 7722 7100 510a 9bff ..#=T...w"q.Q...
00000050: 2321 8a00 6eef 6500 d61b 6a00 6eef c900 #!..n.e...j.n...
00000060: 291d 7a00 6eea c900 7d1e 6700 f203 0000 ).z.n...}.g.....
00000070: 7000 0000 0200 0000 99ce 0abd 561f b03f p...........V..?
00000080: f599 db3f 2227 233e c76c be3d e1d1 3a3d ...?"'#>.l.=..:=
00000090: 34c9 d33d 629d 323d 0b5d 7abc 13fd 3240 4..=b.2=.]z...2@
000000a0: f286 f2bd fc2b 9bbd 1dec dfbc f286 f2bd .....+..........
000000b0: 259e c740 b65e 00be c06d e5bb fc2b 9bbd %..@.^...m...+..
000000c0: bead 649f 40a3 f489 bb1d ecdf bcc0 6de5 ..d.@.........m.
000000d0: bba6 f489 bbc5 c1a4 3e00 0040 40fc ff7f ........>..@@...
000000e0: 0201 0403 0605 0807 0400 0503 7000 0000 ............p...
000000f0: 4368 0a00 0100 0000 0000 0000 0400 0000 Ch..............
00000100: 0200 0000 0000 0000 fc03 0000 3400 0000 ............4...
00000110: 0ad7 233c 0ad7 233c f7cc 9239 6f12 8339 ..#<..#<...9o..9
00000120: 0ad7 233d 4c09 c900 7722 6700 5eef 9bff ..#=L...w"g.^...
00000130: d01f 8300 58fe 9bff ca23 ea00 5bfe 9bff ....X....#..[...
00000140: 1d25 d100 fd03 0000 0400 0000 0100 0000 .%..............
00000150: 0201 0403 0605 0807 0400 0503 7800 0000 ............x...
00000160: 4368 0a00 0200 0000 0000 0000 0500 0000 Ch..............
00000170: 0200 0000 0000 0000 fc03 0000 3c00 0000 ............<...
00000180: 0ad7 233c 0ad7 233c f7cc 9239 6f12 8339 ..#<..#<...9o..9
00000190: 0ad7 233d 4c0f 6500 7722 7400 510a 9bff ..#=L.e.w"t.Q...
000001a0: ca23 9300 66e9 9bff 291d 8600 62eb 9bff .#..f...)...b...
000001b0: 7d1e af00 62e7 9bff d01f 6d00 fd03 0000 }...b.....m.....
000001c0: 0400 0000 0100 0000 0201 0403 0605 0807 ................
000001d0: 0400 0503 7800 0000 4368 0a00 0300 0000 ....x...Ch......
000001e0: 0000 0000 0500 0000 0200 0000 0000 0000 ................
000001f0: fc03 0000 3c00 0000 0ad7 233c 0ad7 233c ....<.....#<..#<
00000200: f7cc 9239 6f12 8339 0ad7 233d 4cfe 9bff ...9o..9..#=L...
00000210: 7722 c500 4e0a 9bff ca23 bc00 6ae8 9bff w"..N....#..j...
00000220: 291d 7d00 62eb 9bff 7d1e 9000 5eef 9bff ).}.b...}...^...
00000230: d01f 6d00 fd03 0000 0400 0000 0100 0000 ..m.............
00000240: 0201 0403 0605 0807 0400 0503 6800 0000 ............h...
00000250: 4368 0a00 0400 0000 0000 0000 0300 0000 Ch..............
00000260: 0200 0000 0000 0000 fc03 0000 2c00 0000 ............,...
00000270: 0ad7 233c 0ad7 233c f7cc 9239 6f12 8339 ..#<..#<...9o..9
00000280: 0ad7 233d 4efb 9bff 2321 9f00 54f8 9bff ..#=N...#!..T...
00000290: 7722 ce00 54fb 9bff ca23 ac00 fd03 0000 w"..T....#......
000002a0: 0400 0000 0100 0000 0201 0403 0605 0807 ................
000002b0: 0400 0503 7000 0000 4368 0a00 0500 0000 ....p...Ch......
000002c0: 0000 0000 0400 0000 0200 0000 0000 0000 ................
000002d0: fc03 0000 3400 0000 0ad7 233c 0ad7 233c ....4.....#<..#<
000002e0: f7cc 9239 6f12 8339 0ad7 233d 54e1 6500 ...9o..9..#=T.e.
000002f0: d01f 6a00 4ef5 9bff 7722 7700 6ae8 6500 ..j.N...w"w.j.e.
00000300: 291d 9900 5ee8 6500 7d1e 9f00 fd03 0000 )...^.e.}.......
00000310: 0400 0000 0100 0000 0201 0403 0605 0807 ................
00000320: 0400 0503 6800 0000 4368 0a00 0600 0000 ....h...Ch......
00000330: 0000 0000 0300 0000 0200 0000 0000 0000 ................
00000340: fc03 0000 2c00 0000 0ad7 233c 0ad7 233c ....,.....#<..#<
00000350: f7cc 9239 6f12 8339 0ad7 233d 51fe 9bff ...9o..9..#=Q...
00000360: 7722 d100 54fe 6500 ca23 e100 58fa 6500 w"..T.e..#..X.e.
00000370: 1d25 8600 fd03 0000 0400 0000 0100 0000 .%..............
00000380: 0201 0403 0605 0807 0400 0503 7000 0000 ............p...
00000390: 4368 0a00 0700 0000 0000 0000 0400 0000 Ch..............
000003a0: 0200 0000 0000 0000 fc03 0000 3400 0000 ............4...
000003b0: 0ad7 233c 0ad7 233c f7cc 9239 6f12 8339 ..#<..#<...9o..9
000003c0: 0ad7 233d 51f2 6500 7d1e ac00 51f2 9bff ..#=Q.e.}...Q...
000003d0: d01f e100 5101 9bff 7722 bc00 5801 6500 ....Q...w"..X.e.
000003e0: ca23 a300 fd03 0000 .#......

(Here's the full dump of data in binary format)

datalog.log

When I decode the header of the first packet, I get the following:

{
version: "3.5.0.4",
length: 273,
frame_number: 1274,
time_cpu_cycles: 0,
num_detected_obj: 5,
num_tlvs: 5,
sub_frame_number: 0
}

So the length of the pakcet should be 273 bytes.

However, if you look at the bytes I pasted above, the sync pattern for the next packet arrives early, at byte 225 (000000e0).

In fact, my parser only finds TLVs of type 1020 and 1010. And the TLV for 1010 is incomplete, as it contains only contains 1 object (I would expect 5, since that is what the header says).

I have read the source code for the sensor code (radar_toolbox_1_00_00_26/source/ti/examples/People_Counting/3D_People_Counting/src/6843/mss/mss_main.c, function MmwDemo_uartTxTask) to look for clues, but I have not been able to find any.

Can you help me understand what is going wrong?

Best regards,
Troels