Tool/software: Code Composer Studio
Hey TI community,
I'm trying to get a higher framerate with GUI option - range-doppler enabled. In the application that I'm building, I'm only interested in objects that are very close to the radar. So I figured to have the sensor only send the first few numbers of the range-doppler profile.
I managed to get it working on 30 FPS (with some problems), here's what I did:
There are only two places that changed. In mss_main.c,
MmwDemo_transmitProcessedOutput(...) {
...
if (pGuiMonSel->rangeDopplerHeatMap)
{
tl[tlvIdx].type = MMWDEMO_OUTPUT_MSG_RANGE_DOPPLER_HEAT_MAP;
// divide the tlv length by the rd_denom (first place changed)
tl[tlvIdx].length = (subFrameCfg->numRangeBins * subFrameCfg->numDopplerBins * sizeof(uint16_t)) / 2; // set the rd profile length to be half of what's given (first place changed)
packetLen += sizeof(MmwDemo_output_message_tl) + tl[tlvIdx].length;
tlvIdx++;
}
...
if (pGuiMonSel->rangeDopplerHeatMap == 1)
{
// only send out half of the message
UART_writePolling (uartHandle,
(uint8_t*)&tl[tlvIdx], // we have changed the tlv length above
sizeof(MmwDemo_output_message_tl));
UART_writePolling (uartHandle,
(uint8_t*)detMatrix,
tl[tlvIdx].length / 2); // only send out half of the data (second place changed)
tlvIdx++;
}
}
The lines I changed have comments showing what the change does. In the above code, it only sends half what's in the detobj buffer, so we're dividing the length by 2.
By increase the denominator to 16, it can work at fps = 30.
However, the range-profile I'm getting this way seems to be broken with this method.
This figure is the range-doppler heatmap I got without changing the sensor's code, and I cropped only the top section, the section that captures objects closer to the radar.
So the above figure is the desired output. Now with the change aforementioned, here's what I get:
, which is obviously not right.
It is clear that the way I'm chunking the information is not right in
UART_writePolling (uartHandle,
(uint8_t*)detMatrix,
tl[tlvIdx].length / 2);
I suspect that it may due to the order of sending out bytes. Perhaps the data is in different endianness in memory that it is over UART. Simply taking the first half chunk of memory helped in reducing the data transmitting time. But the data it sends is not correct ...
Can someone help me with this?
Many thanks in advance!
Best regards,
Ziheng

