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.
Hello,
I've been having a hard time receiving the "Done" string from the IWRBOOST whenever I configure the device using my own C program.
I'm sending the following char arrays one by one over serial UART Config at 115200 baud rate.
If I configure the device using the Visualizer first and then try sending below arrays using my own program, then I will receive the exact line that I sent but without the "Done." string. (Note that the receiving array is 100 bytes in length so I think it should be enough to receive the whole acknowledgement.)
If I don't configure the device using the Visualizer, and just try to configure it using the same C program, I will not receive anything from the serial. The serial read will just timeout.
Am I sending the correct sequence with the \n at the end of the line? I'm also adding 20ms delay per line.
char aTxLine1[] = "dfeDataOutputMode 1\n";
char aTxLine2[] = "channelCfg 15 3 0\n";
char aTxLine3[] = "adcCfg 2 1\n";
char aTxLine4[] = "adcbufCfg 0 1 1 1\n";
char aTxLine5[] = "profileCfg 0 77 30 7 62 0 0 60 1 128 2500 0 0 30\n";
char aTxLine6[] = "chirpCfg 0 0 0 0 0 0 0 1\n";
char aTxLine7[] = "chirpCfg 1 1 0 0 0 0 0 2\n";
char aTxLine8[] = "frameCfg 0 1 128 0 50 1 0\n";
char aTxLine9[] = "lowPower 0 0\n";
char aTxLine10[] = "guiMonitor 1 1 0 0\n";
char aTxLine11[] = "doaCfg 600 1875 30 1\n";
char aTxLine12[] = "SceneryParam - 2 2 0.05 6\n";
char aTxLine13[] = "GatingParam 4 3 2 0\n";
char aTxLine14[] = "StateParam 10 5 10 100 5\n";
char aTxLine15[] = "AllocationParam 250 0.01 5 1 2\n";
char aTxLine16[] = "VariationParam 0.289 0.289 1.0\n";
char aTxLine17[] = "trackingCfg 1 2 250 20 200 50 90\n";
char aTxLine18[] = "sensorStart\n";
The code is like this repeated for all the lines:
/* Send the line */
if (false == libserialcomms_WriteData(handle, aTxLine1, sizeof(aTxLine1), numOfBytesWr))
{
fprintf(stdout, "Write Failed!\n");
return STATUS_ERROR;
}
Sleep(DELAY);
/* Receive ACK from the device */
if (false == libserialcomms_ReadData(handle, data, LINE_BUFF_LEN, numOfBytesRd, timeout))
{
fprintf(stdout, "Read failed\n");
return STATUS_ERROR;
}
If device is configured by Visualizer first,
OUTPUT:
dfeDataOutputMode 1
mmwDemo:/>
channelCfg 15 3 0
mmwDemo:/> >
adcCfg 2 1
mmwDemo:/> emo:/> >
(and so on)
If device is NOT configured by Visualizer, just my program
OUTPUT
nothing
1. Yes, this EVM works with the Visualizer.
2. I'm using onboard XDS110.
3. If I send the config file using Realterm, it will work. I can see the "Done" string being echoed.
Is the \n per line correct and sent as character array? It makes me wonder why I can receive the echo command from the EVM but not the "Done" string, given the device has already been configured by the Visualizer. If fresh from boot up, I don't receive anything.
Hey Mary,
the '\n' should be correct.
Since you are using Windows and I assume you are parsing a text file for your commands: Did you check your parsed line for a '\r'?
In the ROS demo code there is something like this
// Remove Windows carriage-return if present
line.erase(std::remove(line.begin(), line.end(), '\r'), line.end());
afterwards, '\n\ ist appended
line.append("\n");
Good luck,
Enric
Hi,
If the EVM can work with online GUI, please check if your own software can send the config right or not.
The config file is send in scripts, with 115200bps through Application/User Port.
Thanks.
Yes UART is correct. As i said, I was able to send the CLI config and receive the "Done" string via the Application/User/115200bps UART.
Still, after it was configured by my user program, I still can't see the sensor starting and no data is being outputted in Data port/921600bps.
Using Visualizer, everything works fine.
Can you help me review what I'm sending using my C program? I think there is something I might have missed but I couldn't figure it out. I thought everything will be solved once I receive Done strings.
Hi Mary,
when I look at the commands of the visualizer, the visualizer sends these commands in the beginning:
sensorStop
flushCfg
Maybe these are missing?
Oh and I found in SDK User Guide on page 12:
"On every reconfiguration, it sends a 'sensorStop' command to the device first to stop the active run of the mmWave
device. Next, it sends the command 'flushCfg' to flush the old configuration before sending the new configuration. It is
mandatory to flush the old configuration before sending a new configuration. Additionally, it is mandatory to send all the
commands for that demo/platform even if the user desires the functionality to be disabled i.e. no commands are
optional."
Good luck,
Enric
Hi,
Please make sure the CLI command you send through your GUI/Realterm is same as TI's GUI.
Thanks,
Wesley
That is what I already did. And I think that I am sending the same commands as TI Visualizer. Still, it won't work.
I believe I have missed something. That is why I come to this forum to ask help.
Hi,
Please make sure you can get the data using 2 Terminal Serial Port (UART) Monitor tools like PUTTY manually. One is set to 115200 bps for command, the other one is set to 921600 bps for data. Then type in configuration in command terminal with 'enter' on each line. Then you can get the data in data terminal.
If you can not get the data, please check your hardware connection and PC setting. Thanks.
Regards,
Wesley
As I said in many of my previous posts, I tried it with realterm. It's working.
What i can't figure out is why when I try my C program, it doesn't work.
I know it should be solved by myself. I am not asking you to solve it for me. I'm asking for the following questions repeatedly in the previous posts but you keep on saying check the UART port.
1. What could I be missing in my C program CLI config that I cannot make the EVM start streaming data? Should it be that the EVM should be able to start once the "SensorStart" command is successfully received? Note that done strings are being received.
2. Why is it that when I send sensorStop the EVM the data logging will stop and cannot recover unless I press the reset button?
Hi,
Could you please binary compare the command you send through your PC software and official GUI?
Once EVM receive all the right command finish with " SensorStart", it will reply "Done", then the device begin to work.
To recover data logging, could you please try to send the CFG file again?
Thanks.