Other Parts Discussed in Thread: AWR6843
My chip is IWR6843LEVM, and the FW in chip is 'radar_toolbox_1_10_00_13\source\ti\examples\InCabin_Sensing\AWR6843_CPD_with_Classification\prebuilt_binaries\occupancy_detection_3d_68xx.bin'
data and control port config is as below, it is implemented in python:
self.schandle = serial.Serial(self.control_port,baudrate=115200, parity= serial.PARITY_NONE,
timeout=1, writeTimeout=1)
self.sdhandle = serial.Serial(self.data_port, baudrate=921600, timeout=15, write_timeout=15)
The checksum validate func is as below
def validate_checksum1(header):
h = np.frombuffer(header, dtype='uint16')
a = np.uint32(np.sum(h))
CS = np.uint16(np.bitwise_not(a))
print(CS)
I found the checksum of header is not 0 sometimes, example:
header = b'\x02\x01\x04\x03\x06\x05\x08\x07\x04\x00\x05\x03D\x05\x00\x00Ch\n\x00\xdf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0E\x00\x00\x00\x00\x00\x00\x86@\x00\x00\x01\x00*\xf8'
header = b'\x02\x01\x04\x03\x06\x05\x08\x07\x04\x00\x05\x03\x94\x05\x00\x00Ch\n\x00\xeb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00H\x00\x00\x00\x00\x00\x00\xe5A\x00\x00\x01\x00/\xf4'
header = b'\x02\x01\x04\x03\x06\x05\x08\x07\x04\x00\x05\x03\xe4\x04\x00\x00Ch\n\x00\x08\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00sD\x00\x00\x00\x00\x00\x00\x83@\x00\x00\x01\x00\xb1\xf9'
header = b'\x02\x01\x04\x03\x06\x05\x08\x07\x04\x00\x05\x03\\\x05\x00\x00Ch\n\x00\xe2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00/F\x00\x00\x00\x00\x00\x00\xf3@\x00\x00\x01\x003\xf7'
the CS values are all 1
below is the correct headers with CS value 0:
header = b'\x02\x01\x04\x03\x06\x05\x08\x07\x04\x00\x05\x03\x1c\x03\x00\x00Ch\n\x002\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00L8\x00\x00\x00\x00\x00\x00\xe0$\x00\x00\x01\x00\x1a$'
header = b'\x02\x01\x04\x03\x06\x05\x08\x07\x04\x00\x05\x03|\x03\x00\x00Ch\n\x00;\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x12;\x00\x00\x00\x00\x00\x00~)\x00\x00\x01\x00M\x1c'
header = b'\x02\x01\x04\x03\x06\x05\x08\x07\x04\x00\x05\x03T\x04\x00\x00Ch\n\x00H\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00B?\x00\x00\x00\x00\x00\x00\x99.\x00\x00\x01\x00\x1d\x12'
Can you help me why the CS value is not 0 in some headers?