Tool/software:
Hi TI forum,
I have read through this forum and have tried to implement a way to transmit the range azimuth heatmap through UART:
AWR6843AOPEVM: Transmitting Float Data Type Heatmaps via UART in 3D People Counting Demo
Specifically, I am transmitting the data in heatMapOutFromDSP (which to my understanding, should be the variable inst->localHeatmap in 3D_people_tracking_demo_implementation_guide.pdf) :
I have taken the translated address and stored it on gMmwMssMCB.heatMapOutFromDSP.data
heatmapBuff = outputFromDSP->heatMapOut.data; heatmapBuff = (float *)SOC_translateAddress((uint32_t)heatmapBuff, SOC_TranslateAddr_Dir_FROM_OTHER_CPU, &retVal); // DebugP_log2("Pcount3DDemo_handleObjectDetResult: heatmap = (float *)0x%x, size = %d \n", (uint32_t)heatmapBuff, outputFromDSP->heatMapOut.dataSize ); gMmwMssMCB.heatMapOutFromDSP.dataSize = outputFromDSP->heatMapOut.dataSize; gMmwMssMCB.heatMapOutFromDSP.data = heatmapBuff; // outputFromDSP->heatMapOut.data;
Then in uart Task,
I have send the data in chunks of 8000 bytes in separate TLV headers, as I am unable to get it send over 40k bytes in one UART_write operation
/* Try send heatmap info */ if (gMmwMssMCB.heatMapOutFromDSP.datafmt == 0) { uint8_t *dataPtr = (uint8_t *)gMmwMssMCB.heatMapOutFromDSP.data; uint32_t offset = 0; uint32_t chunkCount = 0; while (heatmapLength > 0) { uint32_t chunkSize = (heatmapLength > heatmapChunkSize) ? heatmapChunkSize : heatmapLength; tl.type = 7777 + chunkCount; // Different TL type for each chunk tl.length = chunkSize; heatmapErr1 = UART_write(uartHandle, (uint8_t *)&tl, sizeof(MmwDemo_output_message_tl)); heatmapErr2 = UART_write(uartHandle, dataPtr + offset, chunkSize); offset += chunkSize; heatmapLength -= chunkSize; chunkCount++; DebugP_log3("MmwDemo_uartTxTask, heatmapErr1 = %d, heatmapErr2 = %d, length = %d\n", (uint32_t)heatmapErr1, (uint32_t)heatmapErr2, heatmapLength); } }
Based on the configuration file I used, I am expecting the heatmap size to be of 47872 bytes (range bins * angle bins * 4, 64 * 187 * 4) which would be 11968 floats.
This matches with what the variable gMmwMssMCB.heatMapOutFromDSP.dataSize contains
% SDK Parameters % See the SDK user's guide for more information % "C:\ti\mmwave_sdk_[VER]\docs\mmwave_sdk_user_guide.pdf" sensorStop flushCfg dfeDataOutputMode 1 channelCfg 15 7 0 adcCfg 2 1 adcbufCfg -1 0 1 1 1 lowPower 0 0 % Detection Layer Parameters % See the Detection Layer Tuning Guide for more information % "<RADAR_TOOLBOX_INSTALL_DIR>\source\ti\examples\People_Tracking\docs\3D_people_tracking_detection_layer_tuning_guide.pdf" profileCfg 0 60.75 30.00 25.00 59.10 657930 0 54.71 1 64 2950.00 2 1 36 chirpCfg 0 0 0 0 0 0 0 3 chirpCfg 1 1 0 0 0 0 0 3 chirpCfg 2 2 0 0 0 0 0 4 bpmCfg -1 1 0 1 frameCfg 0 2 96 0 600.0 1 0 dynamicRACfarCfg -1 4 4 2 2 8 12 4 12 5.00 8.00 0.40 1 1 staticRACfarCfg -1 6 2 2 2 8 8 6 4 8.00 15.00 0.30 0 0 dynamicRangeAngleCfg -1 0.75 0.0010 1 0 dynamic2DAngleCfg -1 3.0 0.0300 1 0 1 0.30 0.85 8.00 staticRangeAngleCfg -1 0 8 8 antGeometry0 0 0 -1 -1 -2 -2 -3 -3 -2 -2 -3 -3 antGeometry1 0 -1 -1 0 0 -1 -1 0 -2 -3 -3 -2 antPhaseRot 1 -1 -1 1 1 -1 -1 1 1 -1 -1 1 fovCfg -1 70.0 70.0 compRangeBiasAndRxChanPhase 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 % Tracker Layer Parameters % See the Tracking Layer Tuning Guide for more information % "C:\ti\radar_toolbox_[VER]\source\ti\examples\People_Tracking\docs\3D_people_tracking_tracker_layer_tuning_guide.pdf" staticBoundaryBox -3 3 0.5 7.5 0 3 boundaryBox -4 4 0 8 0 3 sensorPosition 1.5 0 0 gatingParam 3 2 2 3 4 stateParam 3 3 12 500 5 500 allocationParam 50 100 0.1 30 0.5 20 maxAcceleration 0.1 0.1 0.1 trackingCfg 1 2 800 20 46 96 55 presenceBoundaryBox -3 3 0.5 7.5 0 3 sensorStart
What I received from the PC using python looks like this:
I have arranged the data in the format of [azimuth][range] (187, 64)
Within this range of data, there exists very high and very low float values. The heatmap looks static and unchanging
I used np.log10 to figure out what I am looking at:
And after filtering out the first few and last few ranges -> [0:187, 4:60]
It appears that this is the range azimuth heatmap.
But I do not know what are those other values contained within this memory space
My main question is:
Why is the size of the heatmap not what I understood to be 47872 bytes? Am I misinterpreting how this heatmap is stored? Is it not in the form of (187, 64) arrangement?
Thank you for reading!
Shi Xiang