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.

AWR2944EVM: Cannot find magic word in AWR2944EVM's TLV output

Part Number: AWR2944EVM
Other Parts Discussed in Thread: AWR1843BOOST, AWR2944

Tool/software:

Hi,

I’m running the out-of-the-box (OOB) demo on my AWR2944EVM, and it works as expected with TI’s online visualizer.

I’d like to use a custom workflow—similar to what I did with the AWR1843BOOST—where I read the TLV packets over CLI/UART. That way, when I add my own CLI commands into the radar’s firmware, I can parse their output directly in Python, since the online demo can’t be modified.

In TI’s documentation, each TLV frame starts with an “Output buffer magic word.” This is documented here: dev.ti.com/.../node (click the download button to see it, else it looks blank). The docs list this sequence of 16‑bit words: {0x0102, 0x0304, 0x0506, 0x0708}. On a little‑endian host that becomes the byte array [2, 1, 4, 3, 6, 5, 8, 7], which the python script successfully finds in the 1843’s UART stream.

However, the exact same code fails to locate that sequence in the AWR2944EVM’s TLV output, even though both online demos use the same UART baud rate. I’m not finding any device‑specific note in TI’s user guide about a different magic word for the 2944.

So my questions are:

  1. Does the AWR2944EVM use a different magic word?
  2. If it’s supposed to be the same, why might my script—known to work on the 1843—be failing to detect it on the 2944?

Best,

Mark 

The mentioned code: 

import serial
import time
import numpy as np

configFile = "C:/Users/mmpas/PycharmProjects/liveComAWR/Data/profile_onlineDemo.cfg"

COM_UART = 'COM13'
COM_AUX_DAT = 'COM12'

CLIport = serial.Serial(COM_UART, 115200, timeout=0.2)
DataPort = serial.Serial(COM_AUX_DAT,921600, timeout=0.2)

time.sleep(1.0)
CLIport.reset_input_buffer()

byteBuffer = np.zeros(2 ** 15, dtype='uint8')
byteBufferLength = 0;


def sendConfigFile(cfgFile, settle=0.05):
for line in open(cfgFile):
if not line.startswith('%'):
cmd = line.strip('\r\n')

CLIport.write((cmd + '\n').encode())
CLIport.flush()

print(cmd)
time.sleep(0.01)


def readTLV_messages(Dataport):
global byteBuffer, byteBufferLength

# Constants
OBJ_STRUCT_SIZE_BYTES = 12;
BYTE_VEC_ACC_MAX_SIZE = 2 ** 15;
MMWDEMO_UART_MSG_DETECTED_POINTS = 1;
MMWDEMO_UART_MSG_RANGE_PROFILE = 2;
maxBufferSize = 2 ** 15;
tlvHeaderLengthInBytes = 8;
pointLengthInBytes = 16;
magicWord = [2, 1, 4, 3, 6, 5, 8, 7]

# Initialize variables
magicOK = 0
dataOK = 0
frameNumber = 0
detObj = {}

readBuffer = Dataport.read(Dataport.in_waiting)
print(readBuffer)
byteVec = np.frombuffer(readBuffer, dtype='uint8')
byteCount = len(byteVec)

# Check that the buffer is not full, and then add the data to the buffer
if (byteBufferLength + byteCount) < maxBufferSize:
byteBuffer[byteBufferLength:byteBufferLength + byteCount] = byteVec[:byteCount]
byteBufferLength = byteBufferLength + byteCount

#-------------------------<<< Check for the location of the magic word use it as strat index >>>-------------------------
# Check that the buffer has some data
if byteBufferLength > 16:

# Check for all possible locations of the magic word
possibleLocs = np.where(byteBuffer == magicWord[0])[0]

# Confirm that is the beginning of the magic word and store the index in startIdx
startIdx = []
for loc in possibleLocs:
check = byteBuffer[loc:loc + 8]
if np.all(check == magicWord):
startIdx.append(loc)

  • In case this helps someone turns out that the baud rate for the DatPort must be set higher to: 

    DataPort = serial.Serial(COM_AUX_DAT,3125000, timeout=0.2)

    This will allow the script to find the "magic words".

    Though I still don't understand why the online demo visualizer uses a much lower baud rate of "921600" and still works, any clues on that? 

  • Hi Mark,

    Baudrate of data port is configured to be 3125000 in AWR2944 demo. So, you should set the baudrate to be 3125000 in the visualizer.

    In the demo visualizer, you need to update the baudrate to 3125000. You can refer to section 3.4.2. mmWave Demo Visualizer - AWR294X and AWR2x44P of "C:\ti\mmwave_mcuplus_sdk_04_07_01_03\mmwave_mcuplus_sdk_04_07_01_03\docs\mmwave_mcuplus_sdk_user_guide.pdf".

    Regards,

    Samhitha