rl_sensor.c
1 /****************************************************************************************
2  * FileName : rl_sensor.c
3  *
4  * Description : This file defines the functions to configure RF/Sensor in mmwave radar device.
5  *
6  ****************************************************************************************
7  * (C) Copyright 2014, Texas Instruments Incorporated. - TI web address www.ti.com
8  *---------------------------------------------------------------------------------------
9  *
10  * Redistribution and use in source and binary forms, with or without modification,
11  * are permitted provided that the following conditions are met:
12  *
13  * Redistributions of source code must retain the above copyright notice,
14  * this list of conditions and the following disclaimer.
15  *
16  * Redistributions in binary form must reproduce the above copyright notice,
17  * this list of conditions and the following disclaimer in the documentation
18  * and/or other materials provided with the distribution.
19  *
20  * Neither the name of Texas Instruments Incorporated nor the names of its
21  * contributors may be used to endorse or promote products derived from this
22  * software without specific prior written permission.
23  *
24  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
26  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
27  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
28  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34  * POSSIBILITY OF SUCH DAMAGE.
35  */
36 
37  /*
38  ****************************************************************************************
39  * Revision History :
40  *---------------------------------------------------------------------------------------
41  * Version Date Author Defect No Description
42  *---------------------------------------------------------------------------------------
43  * 0.1.0 12May2015 Kaushal Kukkar - Initial Version
44  *
45  * 0.5.2 23Sep2016 Kaushal Kukkar AUTORADAR-540 Advance Frame APIs
46  *
47  * 0.6.0 15Nov2016 Kaushal Kukkar MMWSDK-206 Dynamic Power Save API
48  * Kaushal Kukkar AUTORADAR-571 Cascade Feature Support
49  *
50  * 0.7.0 11May2017 Jitendra Gupta MMWSDK-450 Calibration Config/Report APIs
51  * Jitendra Gupta MMWSDK-322 PS/PA/IF Loopback APIs
52  *
53  * 0.8.6 24Jul2017 Jitendra Gupta MMWL-30 RF/Analog Monitoring APIs
54  * Kaushal Kukkar MMWL-23 Big Endian Support
55  *
56  * 0.9.1 - Jitendra Gupta MMWL-5 Code size optimization
57  ****************************************************************************************
58  */
59 /******************************************************************************
60  * INCLUDE FILES
61  ******************************************************************************
62  */
63 #include <stdlib.h>
64 #include <string.h>
65 #include <ti/control/mmwavelink/mmwavelink.h>
66 #include <ti/control/mmwavelink/include/rl_driver.h>
67 #include <ti/control/mmwavelink/include/rl_messages.h>
68 #include <ti/control/mmwavelink/include/rl_controller.h>
69 #include <ti/control/mmwavelink/include/rl_sensor.h>
70 #include <ti/control/mmwavelink/include/rl_trace.h>
71 
72 
73 /******************************************************************************
74  * GLOBAL VARIABLES/DATA-TYPES DEFINITIONS
75  ******************************************************************************
76  */
77 
78 /******************************************************************************
79  * FUNCTION DEFINITIONS
80  ******************************************************************************
81  */
82 
104 /* Sub block ID: 0x0080, ICD API: AWR_CHAN_CONF_SET_SB */
105 /* DesignId : MMWL_DesignId_009 */
106 /* Requirements : AUTORADAR_REQ-752, AUTORADAR_REQ-757, AUTORADAR_REQ-970 */
107 rlReturnVal_t rlSetChannelConfig(rlUInt8_t deviceMap, rlChanCfg_t* data)
108 {
109  rlReturnVal_t retVal;
110 
111  /* check if deviceIndex is out of defined value */
112  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || (RL_NULL_PTR == data))
113  {
114  /* set return error code */
115  retVal = RL_RET_CODE_INVALID_INPUT;
116  }
117  else
118  {
119  /* Package the command with given data and send it to device */
120  retVal = rlDriverExecuteSetApi(deviceMap, RL_RF_STATIC_CONF_SET_MSG,
121  RL_RF_CHAN_CONF_SB, (rlUInt8_t*)data,
122  (rlUInt16_t)sizeof(rlChanCfg_t));
123  }
124 
125  RL_LOGV_ARG0("rlSetChannelConfig ends...\n");
126  return retVal;
127 
128 }
129 
150 /* Sub block ID: 0x0082, ICD API: AWR_ADCOUT_CONF_SET_SB */
151 /* DesignId : MMWL_DesignId_010 */
152 /* Requirements : AUTORADAR_REQ-753, AUTORADAR_REQ-754 */
153 rlReturnVal_t rlSetAdcOutConfig(rlUInt8_t deviceMap, rlAdcOutCfg_t* data)
154 {
155  rlReturnVal_t retVal;
156 
157  RL_LOGV_ARG0("rlSetAdcOutConfig starts...\n");
158 
159  /* check if deviceIndex is out of defined value */
160  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || \
161  (RL_NULL_PTR == data))
162  {
163  /* set return error code */
164  retVal = RL_RET_CODE_INVALID_INPUT;
165  RL_LOGE_ARG0("rlSetAdcOutConfig, Invalid device map\n");
166  }
167  else
168  {
169  /* Package the command with given data and send it to device */
170  retVal = rlDriverExecuteSetApi(deviceMap, RL_RF_STATIC_CONF_SET_MSG,
171  RL_RF_ADCOUT_CONF_SB, (rlUInt8_t*)data,
172  (rlUInt16_t)sizeof(rlAdcOutCfg_t));
173  }
174 
175  RL_LOGV_ARG0("rlSetAdcOutConfig ends...\n");
176 
177  return retVal;
178 }
179 
196 /* Sub block ID: 0x0180, ICD API: AWR_BPM_COMMON_CONF_SET_SB */
197 /* DesignId : MMWL_DesignId_016 */
198 /* Requirements : AUTORADAR_REQ-724 */
199 rlReturnVal_t rlSetBpmCommonConfig(rlUInt8_t deviceMap, rlBpmCommonCfg_t* data)
200 {
201  rlReturnVal_t retVal;
202 
203  RL_LOGV_ARG0("rlSetBpmCommonConfig starts...\n");
204 
205  /* check if deviceIndex is out of defined value */
206  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || \
207  (RL_NULL_PTR == data))
208  {
209  /* set return error code */
210  retVal = RL_RET_CODE_INVALID_INPUT;
211  RL_LOGE_ARG0("rlSetBpmCommonConfig, Invalid device map\n");
212  }
213  else
214  {
215  /* Package the command with given data and send it to device */
216  retVal = rlDriverExecuteSetApi(deviceMap, RL_RF_ADVANCED_FEATURES_SET_MSG,
217  RL_RF_BPM_COMMON_CONF_SB, (rlUInt8_t*)data,
218  (rlUInt16_t)sizeof(rlBpmCommonCfg_t));
219  }
220  RL_LOGV_ARG0("rlSetBpmCommonConfig ends...\n");
221 
222  return retVal;
223 }
224 
238 /* Sub block ID: 0x0181, ICD API: AWR_BPM_CHIRP_CONF_SET_SB */
239 /* DesignId : MMWL_DesignId_037 */
240 /* Requirements : AUTORADAR_REQ-727 */
241 rlReturnVal_t rlSetBpmChirpConfig(rlUInt8_t deviceMap, rlBpmChirpCfg_t* data)
242 {
243  rlReturnVal_t retVal;
244 
245  RL_LOGV_ARG0("rlSetBpmChirpConfig starts...\n");
246 
247  /* check if deviceIndex is out of defined value */
248  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || \
249  (RL_NULL_PTR == data))
250  {
251  /* set return error code */
252  retVal = RL_RET_CODE_INVALID_INPUT;
253  RL_LOGE_ARG0("rlSetBpmChirpConfig, Invalid device map\n");
254  }
255  else
256  {
257  /* Package the command with given data and send it to device */
258  retVal = rlDriverExecuteSetApi(deviceMap, RL_RF_ADVANCED_FEATURES_SET_MSG,
259  RL_RF_BPM_CHIRP_CONF_SB, (rlUInt8_t*)data,
260  (rlUInt16_t)sizeof(rlBpmChirpCfg_t));
261  }
262 
263  RL_LOGV_ARG0("rlSetBpmChirpConfig ends...\n");
264 
265  return retVal;
266 }
267 
282 /* Sub block ID: 0x0181, ICD API: AWR_BPM_CHIRP_CONF_SET_SB */
283 /* DesignId : MMWL_DesignId_122 */
284 /* Requirements : AUTORADAR_REQ-727 */
285 rlReturnVal_t rlSetMultiBpmChirpConfig(rlUInt8_t deviceMap, rlUInt16_t cnt,
286  rlBpmChirpCfg_t** data)
287 {
288  rlReturnVal_t retVal;
289  RL_LOGV_ARG0("rlSetMultiBpmChirpConfig starts...\n");
290 
291  /* check if deviceIndex is out of defined value */
292  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || (RL_NULL_PTR == data) || \
293  (cnt == 0U))
294  {
295  /* set return error code */
296  retVal = RL_RET_CODE_INVALID_INPUT;
297  }
298  else
299  {
300  /* Initialize Command and Response Sub Blocks */
301  rlDriverMsg_t inMsg;
302  rlDriverMsg_t outMsg = {0};
303 
304  /* Index and other paramerters to send multiple sub blocks in one/more commands chunk */
305  rlUInt16_t sbLen, maxSbCntInMsg, sbCntInMsg, numChnkOfMsg, lastSbCntInMsg, loopCnt, indx;
306 
307 
308  /* Initialize Command and Response Sub Blocks */
309  rlPayloadSb_t inPayloadSb[RL_CMD_PL_LEN_MAX/(sizeof(rlBpmChirpCfg_t) + \
310  RL_SBC_ID_SIZE + RL_SBC_LEN_SIZE)];
311 
312  /* single sub-block length for chirp config API */
313  sbLen = (rlUInt16_t)(sizeof(rlBpmChirpCfg_t) + (RL_SBC_LEN_SIZE + RL_SBC_ID_SIZE));
314 
315  /* get Max Sub Block count */
316  /* AR_CODE_REVIEW MR:D.4.1 <APPROVED> "sbLen can not be zero" */
317  /*LDRA_INSPECTED 127 D */
318  maxSbCntInMsg = (RL_CMD_PL_LEN_MAX /sbLen);
319 
320  retVal = RL_RET_CODE_OK;
321  /* if requested count of chirpConfig is within one Message packet */
322  if (cnt <= maxSbCntInMsg)
323  {
324  sbCntInMsg = cnt;
325  numChnkOfMsg = 1U;
326  lastSbCntInMsg = 0U;
327  }
328  else
329  {
330  sbCntInMsg = maxSbCntInMsg;
331  numChnkOfMsg = cnt / maxSbCntInMsg;
332  lastSbCntInMsg = cnt % maxSbCntInMsg;
333  }
334 
335  /* Fill in-message packet */
336  rlDriverConstructInMsg(RL_RF_ADVANCED_FEATURES_SET_MSG, &inMsg, &inPayloadSb[0]);
337 
338  loopCnt = (lastSbCntInMsg == 0U) ? numChnkOfMsg : (numChnkOfMsg + 1U);
339 
340  while (retVal == RL_RET_CODE_OK)
341  {
342  /* all full messages have been sent, then send last partial message */
343  if ((loopCnt == 1U) && (lastSbCntInMsg != 0U))
344  {
345  inMsg.opcode.nsbc = lastSbCntInMsg;
346  }
347  else
348  {
349  inMsg.opcode.nsbc = sbCntInMsg;
350  }
351 
352  for (indx = 0U; indx < inMsg.opcode.nsbc; indx++)
353  {
354  /* Set Command Sub Block*/
355  /* AR_CODE_REVIEW MR:R.2.2 <APPROVED> "Values are used by called function. \
356  LDRA Tool Issue" */
357  /*LDRA_INSPECTED 105 D */
358  inPayloadSb[indx].sbid = RL_GET_UNIQUE_SBID(RL_RF_ADVANCED_FEATURES_SET_MSG,
359  RL_RF_BPM_CHIRP_CONF_SB);
360  /* AR_CODE_REVIEW MR:R.2.2 <APPROVED> "Values are used by called function. \
361  LDRA Tool Issue" */
362  /*LDRA_INSPECTED 105 D */
363  inPayloadSb[indx].len = (rlUInt16_t)sizeof(rlBpmChirpCfg_t);
364  /* AR_CODE_REVIEW MR:R.2.2 <APPROVED> "Values are used by called function. \
365  LDRA Tool Issue" */
366  /*LDRA_INSPECTED 105 D */
367  inPayloadSb[indx].pSblkData = (rlUInt8_t*)(*data);
368 
369  /*AR_CODE_REVIEW MR:R.18.1 <APPROVED> "require pointer increment to jump to
370  next profile Config */
371  /*LDRA_INSPECTED 567 S */
372  data++;
373  }
374  /* Send Command to mmWave Radar Device */
375  retVal += rlDriverCmdInvoke(deviceMap, inMsg, &outMsg);
376  loopCnt--;
377 
378  if (loopCnt == 0U)
379  {
380  break;
381  }
382  }
383  }
384  RL_LOGV_ARG0("rlSetMultiBpmChirpConfig ends...\n");
385 
386  return retVal;
387 }
388 
433 /* Sub block ID: 0x0100, ICD API: AWR_PROFILE_CONF_SET_SB */
434 /* DesignId : MMWL_DesignId_013 */
435 /* Requirements : AUTORADAR_REQ-728, AUTORADAR_REQ-729, AUTORADAR_REQ-730, AUTORADAR_REQ-731,
436  AUTORADAR_REQ-732, AUTORADAR_REQ-733, AUTORADAR_REQ-734, AUTORADAR_REQ-735,
437  AUTORADAR_REQ-736, AUTORADAR_REQ-737, AUTORADAR_REQ-738, AUTORADAR_REQ-739,
438  AUTORADAR_REQ-740, AUTORADAR_REQ-741, AUTORADAR_REQ-742, AUTORADAR_REQ-743,
439  AUTORADAR_REQ-773
440  */
441 rlReturnVal_t rlSetProfileConfig(rlUInt8_t deviceMap, rlUInt16_t cnt,
442  rlProfileCfg_t* data)
443 {
444  rlReturnVal_t retVal;
445 
446  RL_LOGV_ARG0("rlSetProfileConfig starts...\n");
447 
448  /* check if deviceIndex is out of defined value */
449  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || \
450  (RL_NULL_PTR == data) || (cnt == 0U))
451  {
452  /* set return error code */
453  retVal = RL_RET_CODE_INVALID_INPUT;
454  RL_LOGE_ARG0("rlSetProfileConfig, Invalid device map\n");
455  }
456  else
457  {
458  rlDriverMsg_t inMsg = {0};
459  rlDriverMsg_t outMsg = {0};
460 
461  /* Initialize Command and Response Sub Blocks */
462  rlPayloadSb_t inPayloadSb[RL_CMD_PL_LEN_MAX/(sizeof(rlProfileCfg_t) + \
463  RL_SBC_ID_SIZE + RL_SBC_LEN_SIZE)];
464  /* Variable to count message chunks */
465  rlUInt16_t indx;
466  rlUInt16_t sbCntInAllChunk = 0U;
467  rlUInt16_t maxSbInMsg = (RL_CMD_PL_LEN_MAX /(sizeof(rlProfileCfg_t) + \
468  RL_SBC_ID_SIZE + RL_SBC_LEN_SIZE));
469 
470  /* Construct command packet */
471  rlDriverConstructInMsg(RL_RF_DYNAMIC_CONF_SET_MSG, &inMsg, &inPayloadSb[0]);
472 
473  retVal = RL_RET_CODE_OK;
474  /* Loop to copy all the command data to one message */
475  for (indx = 0U; (indx < cnt) && (retVal == RL_RET_CODE_OK); indx++)
476  {
477  /* Fill in-message payload */
478  /*AR_CODE_REVIEW MR:R.18.1 <APPROVED> "require pointer increment to jump to
479  next profile Config */
480  /*AR_CODE_REVIEW MR:R.18.4 <APPROVED> "require pointer increment to jump to
481  next profile Config */
482  /*LDRA_INSPECTED 87 S */
483  /*LDRA_INSPECTED 567 S */
484  rlDriverFillPayload(RL_RF_DYNAMIC_CONF_SET_MSG, RL_RF_PROFILE_CONF_SB,
485  &inPayloadSb[indx], (rlUInt8_t*)(data + indx),
486  (rlUInt16_t)sizeof(rlProfileCfg_t));
487 
488  /* increment Sub-block count in one packet */
489  sbCntInAllChunk++;
490 
491  /* check if total payload length is going beyond defined limitation */
492  if ((maxSbInMsg == (indx + 1U)) || (cnt == sbCntInAllChunk))
493  {
494  /* setting of numSBC to inMsg */
495  inMsg.opcode.nsbc = (indx + 1U);
496  /* Send Command to mmWave Radar Device */
497  retVal += rlDriverCmdInvoke(deviceMap, inMsg, &outMsg);
498  }
499  }
500  }
501 
502  RL_LOGV_ARG0("rlSetProfileConfig ends...\n");
503 
504  return retVal;
505 }
506 
520 /* Sub block ID: 0x0120, ICD API: AWR_PROFILE_CONF_GET_SB */
521 /* DesignId : MMWL_DesignId_118 */
522 /* Requirements : AUTORADAR_REQ-728, AUTORADAR_REQ-729, AUTORADAR_REQ-730, AUTORADAR_REQ-731,
523 AUTORADAR_REQ-732, AUTORADAR_REQ-733, AUTORADAR_REQ-734, AUTORADAR_REQ-735,
524 AUTORADAR_REQ-736, AUTORADAR_REQ-737, AUTORADAR_REQ-738, AUTORADAR_REQ-739,
525 AUTORADAR_REQ-740, AUTORADAR_REQ-741, AUTORADAR_REQ-742, AUTORADAR_REQ-743,
526 AUTORADAR_REQ-773
527 */
528 rlReturnVal_t rlGetProfileConfig(rlUInt8_t deviceMap, rlUInt16_t profileId, rlProfileCfg_t* data)
529 {
530  rlReturnVal_t retVal;
531 
532  RL_LOGV_ARG0("rlGetProfileConfig ends...\n");
533 
534  /* check if deviceIndex is out of defined value */
535  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || \
536  (RL_NULL_PTR == data))
537  {
538  /* set return error code */
539  retVal = RL_RET_CODE_INVALID_INPUT;
540  RL_LOGE_ARG0("rlGetProfileConfig, Invalid device map\n");
541  }
542  else
543  {
544  /* Initialize Command and Response Sub Blocks */
545  rlDriverMsg_t inMsg = {0};
546  rlDriverMsg_t outMsg = {0};
547  rlPayloadSb_t inPayloadSb = {0};
548  rlPayloadSb_t outPayloadSb = {0};
549  rlWordParam_t wordParam;
550  /* combine half words into WORD structure */
551  wordParam.halfWordOne = profileId;
552  wordParam.halfWordTwo = 0U;
553 
554  /* Construct command packet */
555  rlDriverConstructInMsg(RL_RF_DYNAMIC_CONF_GET_MSG, &inMsg, &inPayloadSb);
556  /* Fill in-message Payload */
557  rlDriverFillPayload(RL_RF_DYNAMIC_CONF_GET_MSG, RL_RF_PROFILE_CONF_SB, &inPayloadSb,
558  (rlUInt8_t*)&wordParam, (rlUInt16_t)sizeof(rlWordParam_t));
559 
560  /* Construct response packet */
561  rlDriverConstructOutMsg(1U, &outMsg, &outPayloadSb);
562  /* Fill in-message Payload */
563  rlDriverFillPayload(0U, 0U, &outPayloadSb, (rlUInt8_t*)data, 0U);
564 
565  /* Send Command to mmWave Radar Device */
566  retVal = rlDriverCmdInvoke(deviceMap, inMsg, &outMsg);
567  }
568 
569  RL_LOGV_ARG0("rlGetProfileConfig ends...\n");
570  return retVal;
571 }
572 
597 /* Sub block ID: 0x0101, ICD API: AWR_CHIRP_CONF_SET_SB */
598 /* DesignId : MMWL_DesignId_014 */
599 /* Requirements : AUTORADAR_REQ-744, AUTORADAR_REQ-745, AUTORADAR_REQ-746, AUTORADAR_REQ-747,
600  AUTORADAR_REQ-748, AUTORADAR_REQ-749, AUTORADAR_REQ-750, AUTORADAR_REQ-751,
601  AUTORADAR_REQ-773
602  */
603 rlReturnVal_t rlSetChirpConfig(rlUInt8_t deviceMap, rlUInt16_t cnt, rlChirpCfg_t* data)
604 {
605  rlReturnVal_t retVal;
606 
607  RL_LOGV_ARG0("rlSetChirpConfig starts...\n");
608 
609  /* check if deviceIndex is out of defined value */
610  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || \
611  (RL_NULL_PTR == data) || (cnt == 0U))
612  {
613  /* set return error code */
614  retVal = RL_RET_CODE_INVALID_INPUT;
615  }
616  else
617  {
618  /* Initialize Command and Response Sub Blocks */
619  rlDriverMsg_t inMsg;
620  rlDriverMsg_t outMsg = {0};
621  /* Index and other paramerters to send multiple sub blocks in one/more commands chunk */
622  rlUInt16_t sbLen, maxSbCntInMsg, sbCntInMsg, numChnkOfMsg, lastSbCntInMsg, loopCnt, indx;
623 
624  /* Initialize Command and Response Sub Blocks */
625  rlPayloadSb_t inPayloadSb[RL_CMD_PL_LEN_MAX/(sizeof(rlChirpCfg_t) + \
626  RL_SBC_ID_SIZE + RL_SBC_LEN_SIZE)];
627 
628  /* single sub-block length for chirp config API */
629  sbLen = (rlUInt16_t)(sizeof(rlChirpCfg_t) + (RL_SBC_LEN_SIZE + RL_SBC_ID_SIZE));
630 
631  /* get Max Sub Block count */
632  /* AR_CODE_REVIEW MR:D.4.1 <APPROVED> "sbLen can not be zero" */
633  /*LDRA_INSPECTED 127 D */
634  maxSbCntInMsg = (RL_CMD_PL_LEN_MAX /sbLen);
635 
636  retVal = RL_RET_CODE_OK;
637  /* if requested count of chirpConfig is within one Message packet */
638  if (cnt <= maxSbCntInMsg)
639  {
640  sbCntInMsg = cnt;
641  numChnkOfMsg = 1U;
642  lastSbCntInMsg = 0U;
643  }
644  else
645  {
646  sbCntInMsg = maxSbCntInMsg;
647  numChnkOfMsg = cnt / maxSbCntInMsg;
648  lastSbCntInMsg = cnt % maxSbCntInMsg;
649  }
650 
651  /* Fill in-message packet */
652  rlDriverConstructInMsg(RL_RF_DYNAMIC_CONF_SET_MSG, &inMsg, &inPayloadSb[0]);
653  /* get the loop count in form of number of msg chunks */
654  loopCnt = (lastSbCntInMsg == 0U) ? numChnkOfMsg : (numChnkOfMsg + 1U);
655 
656  while (retVal == RL_RET_CODE_OK)
657  {
658  /* all full messages have been sent, then send last partial message */
659  if ((loopCnt == 1U) && (lastSbCntInMsg != 0U))
660  {
661  inMsg.opcode.nsbc = lastSbCntInMsg;
662  }
663  else
664  {
665  inMsg.opcode.nsbc = sbCntInMsg;
666  }
667 
668  for (indx = 0U; indx < inMsg.opcode.nsbc; indx++)
669  {
670  /* Set Command Sub Block*/
671  /* AR_CODE_REVIEW MR:R.2.2 <APPROVED> "Values are used by called function. \
672  LDRA Tool Issue" */
673  /*LDRA_INSPECTED 105 D */
674  inPayloadSb[indx].sbid = RL_GET_UNIQUE_SBID(RL_RF_DYNAMIC_CONF_SET_MSG,
675  RL_RF_CHIRP_CONF_SB);
676  /* AR_CODE_REVIEW MR:R.2.2 <APPROVED> "Values are used by called function. \
677  LDRA Tool Issue" */
678  /*LDRA_INSPECTED 105 D */
679  inPayloadSb[indx].len = (rlUInt16_t)sizeof(rlChirpCfg_t);
680  /* AR_CODE_REVIEW MR:R.2.2 <APPROVED> "Values are used by called function. \
681  LDRA Tool Issue" */
682  /*LDRA_INSPECTED 105 D */
683  inPayloadSb[indx].pSblkData = (rlUInt8_t*)(data);
684  /*AR_CODE_REVIEW MR:R.18.1 <APPROVED> "require pointer increment to jump to \
685  next chirp Config */
686  /*LDRA_INSPECTED 567 S */
687  data++;
688  }
689  /* Send Command to mmWave Radar Device */
690  /* AR_CODE_REVIEW MR:R.2.2 <APPROVED> "Values are used by called function. \
691  LDRA Tool Issue" */
692  /*LDRA_INSPECTED 105 D */
693  retVal += rlDriverCmdInvoke(deviceMap, inMsg, &outMsg);
694  /* decrement the loop count */
695  loopCnt--;
696  /* if all chirp configurations have been sent to device then terminate the loop */
697  if (loopCnt == 0U)
698  {
699  break;
700  }
701  }
702  }
703 
704  RL_LOGV_ARG0("rlSetChirpConfig ends...\n");
705 
706  return retVal;
707 }
708 
722 /* Sub block ID: 0x0121, ICD API: AWR_CHIRP_CONF_GET_SB */
723 /* DesignId : MMWL_DesignId_119 */
724 /* Requirements : AUTORADAR_REQ-744, AUTORADAR_REQ-745, AUTORADAR_REQ-746, AUTORADAR_REQ-747,
725 AUTORADAR_REQ-748, AUTORADAR_REQ-749, AUTORADAR_REQ-750, AUTORADAR_REQ-751,
726 AUTORADAR_REQ-773
727 */
728 rlReturnVal_t rlGetChirpConfig(rlUInt8_t deviceMap, rlUInt16_t chirpStartIdx,
729  rlUInt16_t chirpEndIdx, rlChirpCfg_t* data)
730 {
731  rlReturnVal_t retVal;
732  rlChirpCfg_t *chirpCfgData = data;
733 
734  RL_LOGV_ARG0("rlGetChirpConfig starts...\n");
735 
736  /* check if deviceIndex is out of defined value */
737  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || \
738  (RL_NULL_PTR == chirpCfgData))
739  {
740  /* set return error code */
741  retVal = RL_RET_CODE_INVALID_INPUT;
742  RL_LOGE_ARG0("rlGetChirpConfig, Invalid device map\n");
743  }
744  else
745  {
746  /* Initialize Command and Response Sub Blocks */
747  rlDriverMsg_t inMsg = {0};
748  rlDriverMsg_t outMsg = {0};
749  /* Index and other paramerters to send multiple sub blocks in one/more commands chunk */
750  rlUInt16_t sbLen, maxSbCntOutMsg, sbCntOutMsg, numChnkOfMsg, lastSbCntOutMsg, loopCnt;
751 
752  /* file chirp start and end index */
753  rlWordParam_t wordParam;
754 
755  rlPayloadSb_t inPayloadSb = {0};
756  rlPayloadSb_t outPayloadSb;
757 
758  /* single sub-block length for chirp config API */
759  sbLen = (rlUInt16_t)(sizeof(rlChirpCfg_t));
760 
761  /* get Max Sub Block count */
762  /* AR_CODE_REVIEW MR:D.4.1 <APPROVED> "sbLen can not be zero" */
763  /*LDRA_INSPECTED 127 D */
764  maxSbCntOutMsg = (RL_CMD_PL_LEN_MAX -(RL_SBC_LEN_SIZE + RL_SBC_ID_SIZE)) /sbLen;
765 
766  retVal = RL_RET_CODE_OK;
767  /* if requested count of chirpConfig is within one Message packet */
768  if ((chirpEndIdx - chirpStartIdx + 1U) <= maxSbCntOutMsg)
769  {
770  sbCntOutMsg = (chirpEndIdx - chirpStartIdx + 1U);
771  numChnkOfMsg = 0U;
772  lastSbCntOutMsg = 0U;
773  }
774  else
775  {
776  sbCntOutMsg = maxSbCntOutMsg;
777  numChnkOfMsg = (chirpEndIdx - chirpStartIdx + 1U) / maxSbCntOutMsg;
778  lastSbCntOutMsg = (chirpEndIdx - chirpStartIdx + 1U) % maxSbCntOutMsg;
779  }
780  /* set chirp start index to inMsg field */
781  /* AR_CODE_REVIEW MR:R.2.2 <APPROVED> "required to intial with startIdx" */
782  /*LDRA_INSPECTED 8 D */
783  wordParam.halfWordTwo = chirpStartIdx;
784 
785  /* get the loop count in form of number of msg chunks */
786  loopCnt = numChnkOfMsg + 1U;
787  /* setting num of sub-block to one in outMsg */
788  outMsg.opcode.nsbc = 1U;
789 
790  while (retVal == RL_RET_CODE_OK)
791  {
792  /* combine half words into WORD structure */
793  wordParam.halfWordOne = wordParam.halfWordTwo;
794  /* all full messages have been sent, then send last partial message */
795  if ((loopCnt == 1U) && (lastSbCntOutMsg != 0U))
796  {
797  wordParam.halfWordTwo = wordParam.halfWordOne + (lastSbCntOutMsg - 1U);
798  }
799  else
800  {
801  wordParam.halfWordTwo = wordParam.halfWordOne + (sbCntOutMsg - 1U);
802  }
803 
804  /* Construct command packet */
805  rlDriverConstructInMsg(RL_RF_DYNAMIC_CONF_GET_MSG, &inMsg, &inPayloadSb);
806  /* Fill in-message Payload */
807  rlDriverFillPayload(RL_RF_DYNAMIC_CONF_GET_MSG, RL_RF_CHIRP_CONF_SB, &inPayloadSb,
808  (rlUInt8_t*)&wordParam, (rlUInt16_t)sizeof(rlWordParam_t));
809 
810  /* Set Command Sub Block*/
811  outPayloadSb.sbid = RL_GET_UNIQUE_SBID(RL_RF_DYNAMIC_CONF_GET_MSG,
812  RL_RF_CHIRP_CONF_SB);
813  outPayloadSb.len = (rlUInt16_t)sizeof(rlChirpCfg_t);
814  outPayloadSb.pSblkData = (rlUInt8_t*)(chirpCfgData);
815 
816  /* Construct response packet */
817  rlDriverConstructOutMsg(outMsg.opcode.nsbc, &outMsg, &outPayloadSb);
818 
819  /* Send Command to mmWave Radar Device */
820  retVal += rlDriverCmdInvoke(deviceMap, inMsg, &outMsg);
821 
822  /* increment data pointer for next chunk of reponse */
823  chirpCfgData += sbCntOutMsg;
824 
825  /* decrement the loop count */
826  loopCnt--;
827  wordParam.halfWordTwo++;
828  /* if all chirp configurations have been sent to device then terminate the loop */
829  if (loopCnt == 0U)
830  {
831  break;
832  }
833  }
834  }
835 
836  RL_LOGV_ARG0("rlGetChirpConfig ends...\n");
837 
838  return retVal;
839 }
840 
841 
866 rlReturnVal_t rlSetMultiChirpCfg(rlUInt8_t deviceMap, rlUInt16_t cnt,
867  rlChirpCfg_t **data)
868 {
869  rlReturnVal_t retVal;
870  RL_LOGV_ARG0("rlSetMultiChirpCfg starts...\n");
871 
872  /* check if deviceIndex is out of defined value */
873  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || (RL_NULL_PTR == data) || \
874  (cnt == 0U))
875  {
876  /* set return error code */
877  retVal = RL_RET_CODE_INVALID_INPUT;
878  }
879  else
880  {
881  /* Initialize Command and Response Sub Blocks */
882  rlDriverMsg_t inMsg;
883  rlDriverMsg_t outMsg = {0};
884 
885  /* Index and other paramerters to send multiple sub blocks in one/more commands chunk */
886  rlUInt16_t sbLen, maxSbCntInMsg, sbCntInMsg, numChnkOfMsg, lastSbCntInMsg, loopCnt, indx;
887 
888 
889  /* Initialize Command and Response Sub Blocks */
890  rlPayloadSb_t inPayloadSb[RL_CMD_PL_LEN_MAX/(sizeof(rlChirpCfg_t) + \
891  RL_SBC_ID_SIZE + RL_SBC_LEN_SIZE)];
892 
893  /* single sub-block length for chirp config API */
894  sbLen = (rlUInt16_t)(sizeof(rlChirpCfg_t) + (RL_SBC_LEN_SIZE + RL_SBC_ID_SIZE));
895 
896 
897  /* get Max Sub Block count */
898  /* AR_CODE_REVIEW MR:D.4.1 <APPROVED> "sbLen can not be zero" */
899  /*LDRA_INSPECTED 127 D */
900  maxSbCntInMsg = (RL_CMD_PL_LEN_MAX /sbLen);
901 
902  retVal = RL_RET_CODE_OK;
903  /* if requested count of chirpConfig is within one Message packet */
904  if (cnt <= maxSbCntInMsg)
905  {
906  sbCntInMsg = cnt;
907  numChnkOfMsg = 1U;
908  lastSbCntInMsg = 0U;
909  }
910  else
911  {
912  sbCntInMsg = maxSbCntInMsg;
913  numChnkOfMsg = cnt / maxSbCntInMsg;
914  lastSbCntInMsg = cnt % maxSbCntInMsg;
915  }
916 
917  /* Fill in-message packet */
918  rlDriverConstructInMsg(RL_RF_DYNAMIC_CONF_SET_MSG, &inMsg, &inPayloadSb[0]);
919 
920  loopCnt = (lastSbCntInMsg == 0U) ? numChnkOfMsg : (numChnkOfMsg + 1U);
921 
922  while (retVal == RL_RET_CODE_OK)
923  {
924  /* all full messages have been sent, then send last partial message */
925  if ((loopCnt == 1U) && (lastSbCntInMsg != 0U))
926  {
927  inMsg.opcode.nsbc = lastSbCntInMsg;
928  }
929  else
930  {
931  inMsg.opcode.nsbc = sbCntInMsg;
932  }
933 
934  for (indx = 0U; indx < inMsg.opcode.nsbc; indx++)
935  {
936  /* Set Command Sub Block*/
937  /* AR_CODE_REVIEW MR:R.2.2 <APPROVED> "Values are used by called function. \
938  LDRA Tool Issue" */
939  /*LDRA_INSPECTED 105 D */
940  inPayloadSb[indx].sbid = RL_GET_UNIQUE_SBID(RL_RF_DYNAMIC_CONF_SET_MSG,
941  RL_RF_CHIRP_CONF_SB);
942  /* AR_CODE_REVIEW MR:R.2.2 <APPROVED> "Values are used by called function. \
943  LDRA Tool Issue" */
944  /*LDRA_INSPECTED 105 D */
945  inPayloadSb[indx].len = (rlUInt16_t)sizeof(rlChirpCfg_t);
946  /* AR_CODE_REVIEW MR:R.2.2 <APPROVED> "Values are used by called function. \
947  LDRA Tool Issue" */
948  /*LDRA_INSPECTED 105 D */
949  inPayloadSb[indx].pSblkData = (rlUInt8_t*)(*data);
950 
951  /*AR_CODE_REVIEW MR:R.18.1 <APPROVED> "require pointer increment to jump to
952  next profile Config */
953  /*LDRA_INSPECTED 567 S */
954  data++;
955  }
956  /* Send Command to mmWave Radar Device */
957  retVal += rlDriverCmdInvoke(deviceMap, inMsg, &outMsg);
958  loopCnt--;
959 
960  if (loopCnt == 0U)
961  {
962  break;
963  }
964  }
965  }
966  RL_LOGV_ARG0("rlSetMultiChirpCfg ends...\n");
967  return retVal;
968 }
969 
1019 /* Sub block ID: 0x0102, ICD API: AWR_FRAME_CONF_SET_SB */
1020 /* DesignId : MMWL_DesignId_015 */
1021 /* Requirements : AUTORADAR_REQ-715, AUTORADAR_REQ-716, AUTORADAR_REQ-717,
1022  AUTORADAR_REQ-718, AUTORADAR_REQ-719, AUTORADAR_REQ-720 */
1023 rlReturnVal_t rlSetFrameConfig(rlUInt8_t deviceMap, rlFrameCfg_t* data)
1024 {
1025  rlReturnVal_t retVal;
1026 
1027  RL_LOGV_ARG0("rlSetFrameConfig starts...\n");
1028 
1029  /* check if deviceIndex is out of defined value */
1030  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || \
1031  (RL_NULL_PTR == data))
1032  {
1033  /* set return error code */
1034  retVal = RL_RET_CODE_INVALID_INPUT;
1035  RL_LOGE_ARG0("rlSetFrameConfig, Invalid device map\n");
1036  }
1037  else
1038  {
1039  /* Package the command with given data and send it to device */
1040  retVal = rlDriverExecuteSetApi(deviceMap, RL_RF_DYNAMIC_CONF_SET_MSG,
1041  RL_RF_FRAME_CONF_SB, (rlUInt8_t*)data,
1042  (rlUInt16_t)sizeof(rlFrameCfg_t));
1043 
1044  /* If only mmWaveLink instance is running on Host */
1045  if ((retVal == RL_RET_CODE_OK) && (RL_PLATFORM_HOST == rlDriverGetPlatformId()))
1046  {
1047  rlFrameApplyCfg_t frameApplyCfgArgs;
1048  rlUInt32_t tempVar;
1049  frameApplyCfgArgs.reserved = 0U;
1050  frameApplyCfgArgs.numAdcSamples = (data->numAdcSamples);
1051  /*AR_CODE_REVIEW MR:R.10.8 <APPROVED> "Conversion required for RL_SWAP_32 operation"*/
1052  /*LDRA_INSPECTED 332 S */
1053  tempVar = (rlUInt32_t)(((data->chirpEndIdx - data->chirpStartIdx) + 1U) *
1054  data->numLoops);
1055 #ifndef MMWL_BIG_ENDIAN
1056  frameApplyCfgArgs.numChirps = tempVar;
1057 #else
1058  frameApplyCfgArgs.numChirps = RL_SWAP_32(tempVar);
1059 #endif
1060  retVal += rlDeviceFrameConfigApply(deviceMap, &frameApplyCfgArgs);
1061  }
1062  }
1063 
1064  RL_LOGV_ARG0("rlSetFrameConfig ends...\n");
1065 
1066  return retVal;
1067 }
1068 
1080 /* Sub block ID: 0x0122, ICD API: AWR_FRAME_CONF_GET_SB */
1081 /* DesignId : MMWL_DesignId_120 */
1082 /* Requirements : AUTORADAR_REQ-715, AUTORADAR_REQ-716, AUTORADAR_REQ-717,
1083 AUTORADAR_REQ-718, AUTORADAR_REQ-719, AUTORADAR_REQ-720 */
1084 rlReturnVal_t rlGetFrameConfig(rlUInt8_t deviceMap, rlFrameCfg_t* data)
1085 {
1086  rlReturnVal_t retVal;
1087 
1088  RL_LOGV_ARG0("rlGetFrameConfig starts...\n");
1089 
1090  /* check if deviceIndex is out of defined value */
1091  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || \
1092  (RL_NULL_PTR == data))
1093  {
1094  /* set return error code */
1095  retVal = RL_RET_CODE_INVALID_INPUT;
1096  RL_LOGE_ARG0("rlGetFrameConfig, Invalid device map\n");
1097  }
1098  else
1099  {
1100  /* Package the command with given data and send it to device */
1101  retVal = rlDriverExecuteGetApi(deviceMap, RL_RF_DYNAMIC_CONF_GET_MSG,
1102  RL_RF_FRAME_CONF_SB, (rlUInt8_t*)data, 0U);
1103 
1104  /* If only mmWaveLink instance is running on Host */
1105  if ((retVal == RL_RET_CODE_OK) && (RL_PLATFORM_HOST == rlDriverGetPlatformId()))
1106  {
1107  /* Initialize Command and Response Sub Blocks */
1108  rlDriverMsg_t inMsg = {0};
1109  rlDriverMsg_t outMsg = {0};
1110  rlPayloadSb_t inPayloadSb = {0};
1111  rlPayloadSb_t outPayloadSb = {0};
1112  rlFrameApplyCfg_t frameApplyCfgArgs = {0};
1113 
1114  /* Construct command packet */
1115  rlDriverConstructInMsg(RL_DEV_STATUS_GET_MSG, &inMsg, &inPayloadSb);
1116  /* Fill in-message Payload */
1117  /*AR_CODE_REVIEW MR:R.11.2 <APPROVED> "Need to pass NULL pointer" */
1118  /*LDRA_INSPECTED 95 S */
1119  rlDriverFillPayload(RL_DEV_STATUS_GET_MSG, RL_SYS_FRAME_CONFIG_GET_SB,
1120  &inPayloadSb, (rlUInt8_t*)RL_NULL_PTR, 0x0U);
1121 
1122  /* Construct response packet */
1123  rlDriverConstructOutMsg(1U, &outMsg, &outPayloadSb);
1124  /* Fill out-message Payload */
1125  rlDriverFillPayload(0U, 0U, &outPayloadSb,
1126  (rlUInt8_t*)&frameApplyCfgArgs, 0U);
1127 
1128  /* Send Command to mmWave Radar Device */
1129  retVal += rlDriverCmdInvoke(deviceMap, inMsg, &outMsg);
1130 #ifndef MMWL_BIG_ENDIAN
1131 
1132  /* update parameter received by Get Command */
1133  data->numAdcSamples = frameApplyCfgArgs.numAdcSamples;
1134 #else
1135  /* update parameter received by Get Command */
1136  data->numAdcSamples = RL_SWAP_32(frameApplyCfgArgs.numAdcSamples);
1137 #endif
1138  }
1139  }
1140 
1141  RL_LOGV_ARG0("rlGetFrameConfig ends...\n");
1142 
1143  return retVal;
1144 }
1145 
1193 /* Sub block ID: 0x0105, ICD API: AWR_ADVANCED_FRAME_CONF_SB */
1194 /* DesignId : MMWL_DesignId_046 */
1195 /* Requirements : AUTORADAR_REQ-795 */
1196 rlReturnVal_t rlSetAdvFrameConfig(rlUInt8_t deviceMap, rlAdvFrameCfg_t* data)
1197 {
1198  rlReturnVal_t retVal;
1199 
1200  RL_LOGV_ARG0("rlSetAdvFrameConfig starts...\n");
1201 
1202  /* check if deviceIndex is out of defined value */
1203  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || (RL_NULL_PTR == data))
1204  {
1205  /* set return error code */
1206  retVal = RL_RET_CODE_INVALID_INPUT;
1207  RL_LOGE_ARG0("rlSetAdvFrameConfig, Invalid device map\n");
1208  }
1209  else
1210  {
1211  /* Package the command with given data and send it to device */
1212  retVal = rlDriverExecuteSetApi(deviceMap, RL_RF_DYNAMIC_CONF_SET_MSG,
1213  RL_RF_FRAME_CONF_ADVANCED_SB,
1214  (rlUInt8_t*)(&(data->frameSeq)),
1215  (rlUInt16_t)sizeof(rlAdvFrameSeqCfg_t));
1216 
1217  /* If only mmWaveLink instance is running on Host */
1218  if ((RL_RET_CODE_OK == retVal) && (RL_PLATFORM_HOST == rlDriverGetPlatformId()))
1219  {
1220  retVal += rlDeviceAdvFrameConfigApply(deviceMap, &(data->frameData));
1221  }
1222  }
1223 
1224  RL_LOGV_ARG0("rlSetAdvFrameConfig ends...\n");
1225 
1226  return retVal;
1227 }
1228 
1241 /* Sub block ID: 0x0125, ICD API: AWR_ADV_FRAME_CONF_GET_SB */
1242 /* DesignId : MMWL_DesignId_047 */
1243 /* Requirements : AUTORADAR_REQ-796 */
1244 rlReturnVal_t rlGetAdvFrameConfig(rlUInt8_t deviceMap, rlAdvFrameCfg_t* data)
1245 {
1246  rlReturnVal_t retVal;
1247 
1248  RL_LOGV_ARG0("rlGetAdvFrameConfig starts...\n");
1249 
1250  /* check if deviceIndex is out of defined value */
1251  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || \
1252  (RL_NULL_PTR == data))
1253  {
1254  /* set return error code */
1255  retVal = RL_RET_CODE_INVALID_INPUT;
1256  RL_LOGE_ARG0("rlGetAdvFrameConfig, Invalid device map\n");
1257  }
1258  else
1259  {
1260  /* Package the command with given data and send it to device */
1261  retVal = rlDriverExecuteGetApi(deviceMap, RL_RF_DYNAMIC_CONF_GET_MSG,
1262  RL_RF_FRAME_CONF_ADVANCED_SB,
1263  (rlUInt8_t*)(&(data->frameSeq)), 0U);
1264 
1265  /* If only mmWaveLink instance is running on Host */
1266  if ((RL_RET_CODE_OK == retVal) && (RL_PLATFORM_HOST == rlDriverGetPlatformId()))
1267  {
1268  /* Initialize Command and Response Sub Blocks */
1269  rlDriverMsg_t inMsg = {0};
1270  rlDriverMsg_t outMsg = {0};
1271  rlPayloadSb_t inPayloadSb = {0};
1272  rlPayloadSb_t outPayloadSb = {0};
1273 
1274  /* Construct command packet */
1275  rlDriverConstructInMsg(RL_DEV_STATUS_GET_MSG, &inMsg, &inPayloadSb);
1276  /* Fill in-message Payload */
1277  /*AR_CODE_REVIEW MR:R.11.2 <APPROVED> "Need to pass NULL pointer" */
1278  /*LDRA_INSPECTED 95 S */
1279  rlDriverFillPayload(RL_DEV_STATUS_GET_MSG,
1280  RL_SYS_ADV_FRAME_CONFIG_GET_SB,
1281  &inPayloadSb, (rlUInt8_t*)RL_NULL_PTR, 0U);
1282 
1283  /* Construct response packet */
1284  rlDriverConstructOutMsg(1U, &outMsg, &outPayloadSb);
1285  /* Fill out-message Payload */
1286  rlDriverFillPayload(0U, 0U, &outPayloadSb,
1287  (rlUInt8_t*)(&(data->frameData)), 0U);
1288 
1289  /* Send Command to mmWave Radar Device */
1290  retVal += rlDriverCmdInvoke(deviceMap, inMsg, &outMsg);
1291  }
1292  }
1293 
1294  RL_LOGV_ARG0("rlGetAdvFrameConfig ends...\n");
1295 
1296  return retVal;
1297 }
1298 
1314 /* Sub block ID: 0x0103, ICD API: AWR_CONT_STREAMING_MODE_CONF_SET_SB */
1315 /* DesignId : MMWL_DesignId_038 */
1316 /* Requirements : AUTORADAR_REQ-827 */
1317 rlReturnVal_t rlSetContModeConfig(rlUInt8_t deviceMap, rlContModeCfg_t* data)
1318 {
1319  rlReturnVal_t retVal;
1320 
1321  RL_LOGV_ARG0("rlSetContModeConfig starts...\n");
1322 
1323  /* check if deviceIndex is out of defined value */
1324  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || \
1325  (RL_NULL_PTR == data))
1326  {
1327  /* set return error code */
1328  retVal = RL_RET_CODE_INVALID_INPUT;
1329  RL_LOGE_ARG0("rlSetContModeConfig, Invalid device map\n");
1330  }
1331  else
1332  {
1333  /* Package the command with given data and send it to device */
1334  retVal = rlDriverExecuteSetApi(deviceMap, RL_RF_DYNAMIC_CONF_SET_MSG,
1335  RL_RF_CONT_STREAMING_MODE_CONF_SB,
1336  (rlUInt8_t*)data,
1337  (rlUInt16_t)sizeof(rlContModeCfg_t));
1338  }
1339  RL_LOGV_ARG0("rlSetContModeConfig ends...\n");
1340 
1341  return retVal;
1342 }
1343 
1354 /* Sub block ID: 0x0104, ICD API: AWR_CONT_STREAMING_MODE_EN_SB */
1355 /* DesignId : MMWL_DesignId_039 */
1356 /* Requirements : AUTORADAR_REQ-828 */
1357 rlReturnVal_t rlEnableContMode(rlUInt8_t deviceMap, rlContModeEn_t* data)
1358 {
1359  rlReturnVal_t retVal;
1360 
1361  RL_LOGV_ARG0("rlEnableContMode starts...\n");
1362 
1363  /* check if deviceIndex is out of defined value */
1364  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || \
1365  (RL_NULL_PTR == data))
1366  {
1367  /* set return error code */
1368  retVal = RL_RET_CODE_INVALID_INPUT;
1369  RL_LOGE_ARG0("rlEnableContMode, Invalid device map\n");
1370  }
1371  else
1372  {
1373  /* Package the command with given data and send it to device */
1374  retVal = rlDriverExecuteSetApi(deviceMap, RL_RF_DYNAMIC_CONF_SET_MSG,
1375  RL_RF_CONT_STREAMING_MODE_EN_SB,
1376  (rlUInt8_t*)data,
1377  (rlUInt16_t)sizeof(rlContModeEn_t));
1378  }
1379 
1380  RL_LOGV_ARG0("rlEnableContMode starts...\n");
1381 
1382  return retVal;
1383 }
1384 
1401 /* Sub block ID: 0x0083, ICD API: AWR_LOWPOWERMODE_CONF_SET_SB */
1402 /* DesignId : MMWL_DesignId_011 */
1403 /* Requirements : AUTORADAR_REQ-755 */
1404 rlReturnVal_t rlSetLowPowerModeConfig(rlUInt8_t deviceMap, rlLowPowerModeCfg_t* data)
1405 {
1406  rlReturnVal_t retVal;
1407 
1408  RL_LOGV_ARG0("rlSetLowPowerModeConfig starts...\n");
1409 
1410  /* check if deviceIndex is out of defined value */
1411  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || (RL_NULL_PTR == data))
1412  {
1413  /* set return error code */
1414  retVal = RL_RET_CODE_INVALID_INPUT;
1415  RL_LOGE_ARG0("rlSetLowPowerModeConfig, Invalid device map\n");
1416  }
1417  else
1418  {
1419  /* Package the command with given data and send it to device */
1420  retVal = rlDriverExecuteSetApi(deviceMap, RL_RF_STATIC_CONF_SET_MSG,
1421  RL_RF_LOWPOWERMODE_CONF_SB,
1422  (rlUInt8_t*)data,
1423  (rlUInt16_t)sizeof(rlLowPowerModeCfg_t));
1424  }
1425 
1426  RL_LOGV_ARG0("rlSetLowPowerModeConfig ends...\n");
1427  return retVal;
1428 }
1429 
1446 /* Sub block ID: 0x0140, ICD API: AWR_FRAMESTARTSTOP_CONF_SB */
1447 /* DesignId : MMWL_DesignId_017 */
1448 /* Requirements : AUTORADAR_REQ-759 */
1449 rlReturnVal_t rlSensorStart(rlUInt8_t deviceMap)
1450 {
1451  rlReturnVal_t retVal;
1452 
1453  rlFrameTrigger_t frameTriggerArgs;
1454 
1455  RL_LOGV_ARG0("rlSensorStart starts...\n");
1456 
1457  frameTriggerArgs.startStop = RL_FRAME_TRIGGER_START;
1458  frameTriggerArgs.reserved = 0U;
1459 
1460  /* check if deviceIndex is out of defined value */
1461  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK))
1462  {
1463  /* set return error code */
1464  retVal = RL_RET_CODE_INVALID_INPUT;
1465  RL_LOGE_ARG0("rlSensorStart, Invalid device map\n");
1466  }
1467  else
1468  {
1469  /* Package the command with given data and send it to device */
1470  retVal = rlDriverExecuteSetApi(deviceMap, RL_RF_FRAME_TRIG_MSG,
1471  RL_RF_FRAMESTARTSTOP_CONF_SB,
1472  (rlUInt8_t*)(&frameTriggerArgs),
1473  (rlUInt16_t)sizeof(rlFrameTrigger_t));
1474  }
1475  RL_LOGV_ARG0("rlSensorStart ends...\n");
1476 
1477  return retVal;
1478 }
1479 
1500 /* Sub block ID: 0x0140, ICD API: AWR_FRAMESTARTSTOP_CONF_SB */
1501 /* DesignId : MMWL_DesignId_018 */
1502 /* Requirements : AUTORADAR_REQ-760 */
1503 rlReturnVal_t rlSensorStop(rlUInt8_t deviceMap)
1504 {
1505  rlReturnVal_t retVal;
1506 
1507  rlFrameTrigger_t frameTriggerArgs;
1508 
1509  frameTriggerArgs.startStop = RL_FRAME_TRIGGER_STOP;
1510  frameTriggerArgs.reserved = 0U;
1511 
1512  RL_LOGV_ARG0("rlSensorStop starts...\n");
1513 
1514  /* check if deviceIndex is out of defined value */
1515  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK))
1516  {
1517  /* set return error code */
1518  retVal = RL_RET_CODE_INVALID_INPUT;
1519  RL_LOGE_ARG0("rlSensorStop, Invalid device map\n");
1520  }
1521  else
1522  {
1523  /* Package the command with given data and send it to device */
1524  retVal = rlDriverExecuteSetApi(deviceMap, RL_RF_FRAME_TRIG_MSG,
1525  RL_RF_FRAMESTARTSTOP_CONF_SB,
1526  (rlUInt8_t*)(&frameTriggerArgs),
1527  (rlUInt16_t)sizeof(rlFrameTrigger_t));
1528  }
1529  RL_LOGV_ARG0("rlSensorStop ends...\n");
1530 
1531  return retVal;
1532 
1533 }
1534 
1560 /* Sub block ID: 0x0140, ICD API: AWR_FRAMESTARTSTOP_CONF_SB */
1561 /* DesignId : MMWL_DesignId_133 */
1562 /* Requirements : AUTORADAR_REQ-1059 */
1563 rlReturnVal_t rlFrameStartStop(rlUInt8_t deviceMap, rlFrameTrigger_t* data)
1564 {
1565  rlReturnVal_t retVal;
1566 
1567  RL_LOGV_ARG0("rlFrameStartStop starts...\n");
1568 
1569  /* check if deviceIndex is out of defined value */
1570  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK))
1571  {
1572  /* set return error code */
1573  retVal = RL_RET_CODE_INVALID_INPUT;
1574  RL_LOGE_ARG0("rlFrameStartStop, Invalid device map\n");
1575  }
1576  else
1577  {
1578  /* Package the command with given data and send it to device */
1579  retVal = rlDriverExecuteSetApi(deviceMap, RL_RF_FRAME_TRIG_MSG,
1580  RL_RF_FRAMESTARTSTOP_CONF_SB,
1581  (rlUInt8_t*)data,
1582  (rlUInt16_t)sizeof(rlFrameTrigger_t));
1583  }
1584  RL_LOGV_ARG0("rlFrameStartStop ends...\n");
1585 
1586  return retVal;
1587 }
1588 
1622 /* Sub block ID: 0x00C0, ICD API: AWR_RF_INIT_SB */
1623 /* DesignId : MMWL_DesignId_012 */
1624 /* Requirements : AUTORADAR_REQ-758 */
1625 rlReturnVal_t rlRfInit(rlUInt8_t deviceMap)
1626 {
1627  /* Initialize Command and Response Sub Blocks */
1628  rlReturnVal_t retVal;
1629 
1630  RL_LOGV_ARG0("rlRfInit starts...\n");
1631 
1632  /* check if deviceIndex is out of defined value */
1633  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK))
1634  {
1635  /* set return error code */
1636  retVal = RL_RET_CODE_INVALID_INPUT;
1637  RL_LOGE_ARG0("rlRfInit, Invalid device map\n");
1638  }
1639  else
1640  {
1641  /* Package the command with given data and send it to device */
1642  retVal = rlDriverExecuteSetApi(deviceMap, RL_RF_INIT_MSG, RL_RF_RF_INIT_SB, NULL, 0U);
1643  }
1644  RL_LOGV_ARG0("rlRfInit ends...\n");
1645 
1646  return retVal;
1647 }
1648 
1670 /* Sub block ID: 0x02C2, ICD API: AWR_RF_TEST_SOURCE_CONFIG_SET_SB */
1671 /* DesignId : MMWL_DesignId_035 */
1672 /* Requirements : AUTORADAR_REQ-790, AUTORADAR_REQ-1008 */
1673 rlReturnVal_t rlSetTestSourceConfig(rlUInt8_t deviceMap, rlTestSource_t* data)
1674 {
1675  rlReturnVal_t retVal;
1676 
1677  RL_LOGV_ARG0("rlSetTestSourceConfig starts...\n");
1678 
1679  /* check if deviceIndex is out of defined value */
1680  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || \
1681  (RL_NULL_PTR == data))
1682  {
1683  /* set return error code */
1684  retVal = RL_RET_CODE_INVALID_INPUT;
1685  RL_LOGE_ARG0("rlSetTestSourceConfig, Invalid device map\n");
1686  }
1687  else
1688  {
1689  /* Package the command with given data and send it to device */
1690  retVal = rlDriverExecuteSetApi(deviceMap, RL_RF_MISC_CONF_SET_MSG,
1691  RL_RF_TEST_SOURCE_CONFIG_SET_SB,
1692  (rlUInt8_t*)data,
1693  (rlUInt16_t)sizeof(rlTestSource_t));
1694  }
1695  RL_LOGV_ARG0("rlSetTestSourceConfig ends...\n");
1696 
1697  return retVal;
1698 }
1699 
1710 /* Sub block ID: 0x02C3, ICD API: AWR_RF_TEST_SOURCE_ENABLE_SET_SB */
1711 /* DesignId : MMWL_DesignId_036 */
1712 /* Requirements : AUTORADAR_REQ-791 */
1713 rlReturnVal_t rlTestSourceEnable(rlUInt8_t deviceMap, rlTestSourceEnable_t* data)
1714 {
1715  rlReturnVal_t retVal;
1716 
1717  RL_LOGV_ARG0("rlTestSourceEnable starts...\n");
1718 
1719  /* check if deviceIndex is out of defined value */
1720  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || \
1721  (RL_NULL_PTR == data))
1722  {
1723  /* set return error code */
1724  retVal = RL_RET_CODE_INVALID_INPUT;
1725  RL_LOGE_ARG0("rlTestSourceEnable, Invalid device map\n");
1726  }
1727  else
1728  {
1729  /* Package the command with given data and send it to device */
1730  retVal = rlDriverExecuteSetApi(deviceMap, RL_RF_MISC_CONF_SET_MSG,
1731  RL_RF_TEST_SOURCE_ENABLE_SET_SB,
1732  (rlUInt8_t*)data,
1733  (rlUInt16_t)sizeof(rlTestSourceEnable_t));
1734  }
1735  RL_LOGV_ARG0("rlTestSourceEnable ends...\n");
1736 
1737  return retVal;
1738 }
1739 
1750 /* Sub block ID: 0x02EA, ICD API: AWR_RF_TEMPERATURE_GET_SB */
1751 /* DesignId : MMWL_DesignId_029 */
1752 /* Requirements : AUTORADAR_REQ-789 */
1753 rlReturnVal_t rlRfGetTemperatureReport(rlUInt8_t deviceMap, rlRfTempData_t* data)
1754 {
1755  rlReturnVal_t retVal;
1756 
1757  RL_LOGV_ARG0("rlRfGetTemperatureReport starts...\n");
1758 
1759  /* check if deviceIndex is out of defined value */
1760  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || \
1761  (RL_NULL_PTR == data))
1762  {
1763  /* set return error code */
1764  retVal = RL_RET_CODE_INVALID_INPUT;
1765  RL_LOGE_ARG0("rlRfGetTemperatureReport, Invalid device map\n");
1766  }
1767  else
1768  {
1769  /* Package the command with given data and send it to device */
1770  retVal = rlDriverExecuteGetApi(deviceMap, RL_RF_MISC_CONF_GET_MSG,
1771  RL_RF_CHAR_CONF_DYNAMIC_GET_SB,
1772  (rlUInt8_t*)data, (rlUInt16_t)sizeof(rlRfTempData_t));
1773  }
1774  RL_LOGV_ARG0("rlRfGetTemperatureReport ends...\n");
1775 
1776  return retVal;
1777 }
1792 /* Sub block ID: 0x0260, ICD API: AWR_RF_DFE_STATISTICS_REPORT_GET_SB */
1793 /* DesignId : MMWL_DesignId_041 */
1794 /* Requirements : AUTORADAR_REQ-788 */
1795 rlReturnVal_t rlRfDfeRxStatisticsReport(rlUInt8_t deviceMap, rlDfeStatReport_t* data)
1796 {
1797  rlReturnVal_t retVal;
1798 
1799  RL_LOGV_ARG0("rlRfDfeRxdStatisticsReport starts...\n");
1800 
1801  /* check if deviceIndex is out of defined value */
1802  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || \
1803  (RL_NULL_PTR == data))
1804  {
1805  /* set return error code */
1806  retVal = RL_RET_CODE_INVALID_INPUT;
1807  RL_LOGE_ARG0("Invalid input\n");
1808  }
1809  else
1810  {
1811  /* Package the command with given data and send it to device */
1812  retVal = rlDriverExecuteGetApi(deviceMap, RL_RF_MONITORING_REPO_GET_MSG,
1813  RL_RF_DFE_STATISTICS_REPORT_GET_SB,
1814  (rlUInt8_t*)data, 0U);
1815  }
1816  RL_LOGV_ARG0("rlRfDfeRxdStatisticsReport completes...\n");
1817 
1818  return retVal;
1819 }
1820 
1841 /* Sub block ID: 0x0084, ICD API: AWR_DYNAMICPOWERSAVE_CONF_SET_SB */
1842 /* DesignId : MMWL_DesignId_019 */
1843 /* Requirements : AUTORADAR_REQ-797 */
1844 rlReturnVal_t rlRfDynamicPowerSave(rlUInt8_t deviceMap, rlDynPwrSave_t* data)
1845 {
1846  rlReturnVal_t retVal;
1847 
1848  RL_LOGV_ARG0("rlRfDynamicPowerSave starts...\n");
1849 
1850  /* check if deviceIndex is out of defined value */
1851  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || \
1852  (RL_NULL_PTR == data))
1853  {
1854  /* set return error code */
1855  retVal = RL_RET_CODE_INVALID_INPUT;
1856  RL_LOGE_ARG0("Invalid input\n");
1857  }
1858  else
1859  {
1860  /* Package the command with given data and send it to device */
1861  retVal = rlDriverExecuteSetApi(deviceMap, RL_RF_STATIC_CONF_SET_MSG,
1862  RL_RF_DYNAMICPOWERSAVE_CONF_SB,
1863  (rlUInt8_t*)data,
1864  (rlUInt16_t)sizeof(rlDynPwrSave_t));
1865  }
1866  RL_LOGV_ARG0("rlRfDynamicPowerSave completes...\n");
1867 
1868  return retVal;
1869 }
1870 
1891 /* Sub block ID: 0x0086, ICD API: AWR_RF_DEVICE_CFG_SB */
1892 /* DesignId : MMWL_DesignId_042 */
1893 /* Requirements : AUTORADAR_REQ-794 */
1894 rlReturnVal_t rlRfSetDeviceCfg(rlUInt8_t deviceMap, rlRfDevCfg_t* data)
1895 {
1896  rlReturnVal_t retVal;
1897 
1898  RL_LOGV_ARG0("rlRfSetDeviceCfg starts...\n");
1899 
1900  /* check if deviceIndex is out of defined value */
1901  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || \
1902  (RL_NULL_PTR == data))
1903  {
1904  /* set return error code */
1905  retVal = RL_RET_CODE_INVALID_INPUT;
1906  RL_LOGE_ARG0("Invalid input\n");
1907  }
1908  else
1909  {
1910  /* Package the command with given data and send it to device */
1911  retVal = rlDriverExecuteSetApi(deviceMap, RL_RF_STATIC_CONF_SET_MSG,
1912  RL_RF_DEVICE_CFG_SB,
1913  (rlUInt8_t*)data,
1914  (rlUInt16_t)sizeof(rlRfDevCfg_t));
1915  }
1916  RL_LOGV_ARG0("rlRfSetDeviceCfg completes...\n");
1917 
1918  return retVal;
1919 }
1920 
1937 /* Sub block ID: 0x02D0, ICD API: AWR_RF_GPADC_CFG_SET_SB */
1938 /* DesignId : MMWL_DesignId_044 */
1939 /* Requirements : AUTORADAR_REQ-792 */
1940 rlReturnVal_t rlSetGpAdcConfig(rlUInt8_t deviceMap, rlGpAdcCfg_t* data)
1941 {
1942  rlReturnVal_t retVal;
1943 
1944  RL_LOGV_ARG0("rlSetGpAdcConfig starts...\n");
1945 
1946  /* check if deviceIndex is out of defined value */
1947  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || \
1948  (RL_NULL_PTR == data))
1949  {
1950  /* set return error code */
1951  retVal = RL_RET_CODE_INVALID_INPUT;
1952  RL_LOGE_ARG0("Invalid input\n");
1953  }
1954  else
1955  {
1956  /* Package the command with given data and send it to device */
1957  retVal = rlDriverExecuteSetApi(deviceMap, RL_RF_MISC_CONF_SET_MSG,
1958  RL_RF_GPADC_CONF_SET_SB,
1959  (rlUInt8_t*)data,
1960  (rlUInt16_t)sizeof(rlGpAdcCfg_t));
1961  }
1962  RL_LOGV_ARG0("rlSetGpAdcConfig completes...\n");
1963 
1964  return retVal;
1965 }
1966 
1982 /* Sub block ID: 0x02CC, ICD API: AWR_RF_LDO_BYPASS_SB */
1983 /* DesignId : MMWL_DesignId_043 */
1984 /* Requirements : AUTORADAR_REQ-793 */
1985 rlReturnVal_t rlRfSetLdoBypassConfig(rlUInt8_t deviceMap, rlRfLdoBypassCfg_t* data)
1986 {
1987  rlReturnVal_t retVal;
1988 
1989  RL_LOGV_ARG0("rlRfSetLdoBypassConfig starts...\n");
1990 
1991  /* check if deviceIndex is out of defined value */
1992  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || (RL_NULL_PTR == data))
1993  {
1994  /* set return error code */
1995  retVal = RL_RET_CODE_INVALID_INPUT;
1996  }
1997  else
1998  {
1999  /* Package the command with given data and send it to device */
2000  retVal = rlDriverExecuteSetApi(deviceMap, RL_RF_MISC_CONF_SET_MSG,
2001  RL_RF_LDOBYPASS_SET_SB,
2002  (rlUInt8_t*)data,
2003  (rlUInt16_t)sizeof(rlRfLdoBypassCfg_t));
2004  }
2005 
2006  RL_LOGV_ARG0("rlRfSetLdoBypassConfig completes...\n");
2007  return retVal;
2008 }
2009 
2033 /* Sub block ID: 0x0106, ICD API: AWR_PERCHIRPPHASESHIFT_CONF_SB */
2034 /* DesignId : MMWL_DesignId_045 */
2035 /* Requirements : AUTORADAR_REQ-798 */
2036 rlReturnVal_t rlRfSetPhaseShiftConfig(rlUInt8_t deviceMap, rlUInt16_t cnt,
2037  rlRfPhaseShiftCfg_t* data)
2038 {
2039  rlReturnVal_t retVal;
2040 
2041  RL_LOGV_ARG0("rlRfSetPhaseShiftConfig starts...\n");
2042 
2043  /* check if deviceIndex is out of defined value */
2044  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || \
2045  (RL_NULL_PTR == data) || (cnt == 0U))
2046  {
2047  /* set return error code */
2048  retVal = RL_RET_CODE_INVALID_INPUT;
2049  }
2050  else
2051  {
2052  /* Initialize Command and Response Sub Blocks */
2053  rlDriverMsg_t inMsg;
2054  rlDriverMsg_t outMsg = {0};
2055  /* Index and other paramerters to send multiple sub blocks in one/more commands chunk */
2056  rlUInt16_t sbLen, maxSbCntInMsg, sbCntInMsg, numChnkOfMsg, lastSbCntInMsg, loopCnt, indx;
2057 
2058  /* Initialize Command and Response Sub Blocks */
2059  rlPayloadSb_t inPayloadSb[RL_CMD_PL_LEN_MAX/(sizeof(rlRfPhaseShiftCfg_t) + \
2060  RL_SBC_ID_SIZE + RL_SBC_LEN_SIZE)];
2061 
2062  /* single sub-block length for chirp config API */
2063  sbLen = (rlUInt16_t)(sizeof(rlRfPhaseShiftCfg_t) + (RL_SBC_LEN_SIZE + RL_SBC_ID_SIZE));
2064 
2065  /* get Max Sub Block count */
2066  /* AR_CODE_REVIEW MR:D.4.1 <APPROVED> "sbLen can not be zero" */
2067  /*LDRA_INSPECTED 127 D */
2068  maxSbCntInMsg = (RL_CMD_PL_LEN_MAX /sbLen);
2069 
2070  retVal = RL_RET_CODE_OK;
2071  /* if requested count of chirpConfig is within one Message packet */
2072  if (cnt <= maxSbCntInMsg)
2073  {
2074  sbCntInMsg = cnt;
2075  numChnkOfMsg = 1U;
2076  lastSbCntInMsg = 0U;
2077  }
2078  else
2079  {
2080  sbCntInMsg = maxSbCntInMsg;
2081  numChnkOfMsg = cnt / maxSbCntInMsg;
2082  lastSbCntInMsg = cnt % maxSbCntInMsg;
2083  }
2084 
2085  /* Fill in-message packet */
2086  rlDriverConstructInMsg(RL_RF_DYNAMIC_CONF_SET_MSG, &inMsg, &inPayloadSb[0]);
2087  /* get the loop count in form of number of msg chunks */
2088  loopCnt = (lastSbCntInMsg == 0U) ? numChnkOfMsg : (numChnkOfMsg + 1U);
2089 
2090  while (retVal == RL_RET_CODE_OK)
2091  {
2092  /* all full messages have been sent, then send last partial message */
2093  if ((loopCnt == 1U) && (lastSbCntInMsg != 0U))
2094  {
2095  inMsg.opcode.nsbc = lastSbCntInMsg;
2096  }
2097  else
2098  {
2099  inMsg.opcode.nsbc = sbCntInMsg;
2100  }
2101 
2102  for (indx = 0U; indx < inMsg.opcode.nsbc; indx++)
2103  {
2104  /* Set Command Sub Block*/
2105  /* AR_CODE_REVIEW MR:R.2.2 <APPROVED> "Values are used by called function. \
2106  LDRA Tool Issue" */
2107  /*LDRA_INSPECTED 105 D */
2108  inPayloadSb[indx].sbid = RL_GET_UNIQUE_SBID(RL_RF_DYNAMIC_CONF_SET_MSG,
2109  RL_RF_PERCHIRPPHASESHIFT_CONF_SB);
2110  /* AR_CODE_REVIEW MR:R.2.2 <APPROVED> "Values are used by called function. \
2111  LDRA Tool Issue" */
2112  /*LDRA_INSPECTED 105 D */
2113  inPayloadSb[indx].len = (rlUInt16_t)sizeof(rlRfPhaseShiftCfg_t);
2114  /* AR_CODE_REVIEW MR:R.2.2 <APPROVED> "Values are used by called function. \
2115  LDRA Tool Issue" */
2116  /*LDRA_INSPECTED 105 D */
2117  inPayloadSb[indx].pSblkData = (rlUInt8_t*)(data);
2118  /*AR_CODE_REVIEW MR:R.18.1 <APPROVED> "require pointer increment to jump to \
2119  next chirp Config */
2120  /*LDRA_INSPECTED 567 S */
2121  data++;
2122  }
2123  /* Send Command to mmWave Radar Device */
2124  /* AR_CODE_REVIEW MR:R.2.2 <APPROVED> "Values are used by called function. \
2125  LDRA Tool Issue" */
2126  /*LDRA_INSPECTED 105 D */
2127  retVal += rlDriverCmdInvoke(deviceMap, inMsg, &outMsg);
2128  /* decrement the loop count */
2129  loopCnt--;
2130  /* if all phase shift configs have been sent to device then terminate the loop */
2131  if (loopCnt == 0U)
2132  {
2133  break;
2134  }
2135  }
2136  }
2137 
2138  RL_LOGV_ARG0("rlRfSetPhaseShiftConfig ends...\n");
2139 
2140  return retVal;
2141 }
2142 
2157 /* Sub block ID: 0x02CD, ICD API: AWR_RF_PALOOPBACK_CFG_SB */
2158 /* DesignId : MMWL_DesignId_098 */
2159 /* Requirements : AUTORADAR_REQ-801 */
2160 rlReturnVal_t rlRfSetPALoopbackConfig(rlUInt8_t deviceMap, rlRfPALoopbackCfg_t* data)
2161 {
2162  rlReturnVal_t retVal;
2163 
2164  RL_LOGV_ARG0("rlRfSetPALoopbackConfig starts...\n");
2165 
2166  /* check if deviceIndex is out of defined value */
2167  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || (RL_NULL_PTR == data))
2168  {
2169  /* set return error code */
2170  retVal = RL_RET_CODE_INVALID_INPUT;
2171  }
2172  else
2173  {
2174  /* Package the command with given data and send it to device */
2175  retVal = rlDriverExecuteSetApi(deviceMap, RL_RF_MISC_CONF_SET_MSG,
2176  RL_RF_PALOOPBACK_CFG_SET_SB,
2177  (rlUInt8_t*)data,
2178  (rlUInt16_t)sizeof(rlRfPALoopbackCfg_t));
2179  }
2180 
2181  RL_LOGV_ARG0("rlRfSetPALoopbackConfig completes...\n");
2182  return retVal;
2183 }
2184 
2207 /* Sub block ID: 0x02CE, ICD API: AWR_RF_PSLOOPBACK_CFG_SB */
2208 /* DesignId : MMWL_DesignId_099 */
2209 /* Requirements : AUTORADAR_REQ-802 */
2210 rlReturnVal_t rlRfSetPSLoopbackConfig(rlUInt8_t deviceMap, rlRfPSLoopbackCfg_t* data)
2211 {
2212  rlReturnVal_t retVal;
2213 
2214  RL_LOGV_ARG0("rlRfSetPSLoopbackConfig starts...\n");
2215 
2216  /* check if deviceIndex is out of defined value */
2217  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || (RL_NULL_PTR == data))
2218  {
2219  /* set return error code */
2220  retVal = RL_RET_CODE_INVALID_INPUT;
2221  }
2222  else
2223  {
2224  /* Package the command with given data and send it to device */
2225  retVal = rlDriverExecuteSetApi(deviceMap, RL_RF_MISC_CONF_SET_MSG,
2226  RL_RF_PSLOOPBACK_CFG_SET_SB,
2227  (rlUInt8_t*)data,
2228  (rlUInt16_t)sizeof(rlRfPSLoopbackCfg_t));
2229  }
2230 
2231  RL_LOGV_ARG0("rlRfSetPSLoopbackConfig completes...\n");
2232  return retVal;
2233 }
2234 
2250 /* Sub block ID: 0x02CF, ICD API: AWR_RF_IFLOOPBACK_CFG_SB */
2251 /* DesignId : MMWL_DesignId_100 */
2252 /* Requirements : AUTORADAR_REQ-803 */
2253 rlReturnVal_t rlRfSetIFLoopbackConfig(rlUInt8_t deviceMap, rlRfIFLoopbackCfg_t* data)
2254 {
2255  rlReturnVal_t retVal;
2256 
2257  RL_LOGV_ARG0("rlRfSetIFLoopbackConfig starts...\n");
2258 
2259  /* check if deviceIndex is out of defined value */
2260  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || (RL_NULL_PTR == data))
2261  {
2262  /* set return error code */
2263  retVal = RL_RET_CODE_INVALID_INPUT;
2264  }
2265  else
2266  {
2267  /* Package the command with given data and send it to device */
2268  retVal = rlDriverExecuteSetApi(deviceMap, RL_RF_MISC_CONF_SET_MSG,
2269  RL_RF_IFLOOPBACK_CFG_SET_SB,
2270  (rlUInt8_t*)data,
2271  (rlUInt16_t)sizeof(rlRfIFLoopbackCfg_t));
2272  }
2273 
2274  RL_LOGV_ARG0("rlRfSetIFLoopbackConfig completes...\n");
2275  return retVal;
2276 }
2277 
2299 /* Sub block ID: 0x0107, ICD API: AWR_PROG_FILT_COEFF_RAM_SET_SB */
2300 /* DesignId : MMWL_DesignId_050 */
2301 /* Requirements : AUTORADAR_REQ-799 */
2302 rlReturnVal_t rlRfSetProgFiltCoeffRam(rlUInt8_t deviceMap, rlRfProgFiltCoeff_t* data)
2303 {
2304  rlReturnVal_t retVal;
2305 
2306  RL_LOGV_ARG0("rlRfSetProgFiltCoeffRam starts...\n");
2307 
2308  /* check if deviceIndex is out of defined value */
2309  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || (RL_NULL_PTR == data))
2310  {
2311  /* set return error code */
2312  retVal = RL_RET_CODE_INVALID_INPUT;
2313  }
2314  else
2315  {
2316  /* Package the command with given data and send it to device */
2317  retVal = rlDriverExecuteSetApi(deviceMap, RL_RF_DYNAMIC_CONF_SET_MSG,
2318  RL_RF_PROG_FILT_COEFF_RAM_SET_SB,
2319  (rlUInt8_t*)data,
2320  (rlUInt16_t)sizeof(rlRfProgFiltCoeff_t));
2321  }
2322 
2323  RL_LOGV_ARG0("rlRfSetProgFiltCoeffRam completes...\n");
2324 
2325  return retVal;
2326 }
2327 
2341 /* Sub block ID: 0x0108, ICD API: AWR_PROG_FILT_CONF_SET_SB */
2342 /* DesignId : MMWL_DesignId_051 */
2343 /* Requirements : AUTORADAR_REQ-800 */
2344 rlReturnVal_t rlRfSetProgFiltConfig(rlUInt8_t deviceMap, rlRfProgFiltConf_t* data)
2345 {
2346  rlReturnVal_t retVal;
2347 
2348  RL_LOGV_ARG0("rlRfSetProgFiltConfig starts...\n");
2349 
2350  /* check if deviceIndex is out of defined value */
2351  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || (RL_NULL_PTR == data))
2352  {
2353  /* set return error code */
2354  retVal = RL_RET_CODE_INVALID_INPUT;
2355  }
2356  else
2357  {
2358  /* Package the command with given data and send it to device */
2359  retVal = rlDriverExecuteSetApi(deviceMap, RL_RF_DYNAMIC_CONF_SET_MSG,
2360  RL_RF_PROG_FILT_CONF_SET_SB,
2361  (rlUInt8_t*)data,
2362  (rlUInt16_t)sizeof(rlRfProgFiltConf_t));
2363  }
2364 
2365  RL_LOGV_ARG0("rlRfSetProgFiltConfig completes...\n");
2366 
2367  return retVal;
2368 }
2369 
2384 /* Sub block ID: 0x0087, ICD API: AWR_RF_RADAR_MISC_CTL_SB */
2385 /* DesignId : MMWL_DesignId_052 */
2386 /* Requirements : AUTORADAR_REQ-891 */
2387 rlReturnVal_t rlRfSetMiscConfig(rlUInt8_t deviceMap, rlRfMiscConf_t* data)
2388 {
2389  rlReturnVal_t retVal;
2390 
2391  RL_LOGV_ARG0("rlRfSetMiscConfig starts...\n");
2392 
2393  /* check if deviceIndex is out of defined value */
2394  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || (RL_NULL_PTR == data))
2395  {
2396  /* set return error code */
2397  retVal = RL_RET_CODE_INVALID_INPUT;
2398  }
2399  else
2400  {
2401  /* Package the command with given data and send it to device */
2402  retVal = rlDriverExecuteSetApi(deviceMap, RL_RF_STATIC_CONF_SET_MSG,
2403  RL_RF_RADAR_MISC_CTL_SB,
2404  (rlUInt8_t*)data,
2405  (rlUInt16_t)sizeof(rlRfMiscConf_t));
2406  }
2407 
2408  RL_LOGV_ARG0("rlRfSetMiscConfig completes...\n");
2409  return retVal;
2410 }
2411 
2436 /* Sub block ID: 0x0109, ICD API: AWR_CALIB_MON_TIME_UNIT_CONF_SB */
2437 /* DesignId : MMWL_DesignId_053 */
2438 /* Requirements : AUTORADAR_REQ-892 */
2439 rlReturnVal_t rlRfSetCalMonTimeUnitConfig(rlUInt8_t deviceMap,
2441 {
2442  rlReturnVal_t retVal;
2443 
2444  RL_LOGV_ARG0("rlRfSetCalMonTimeUnitConfig starts...\n");
2445 
2446  /* check if deviceIndex is out of defined value */
2447  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || (RL_NULL_PTR == data))
2448  {
2449  /* set return error code */
2450  retVal = RL_RET_CODE_INVALID_INPUT;
2451  }
2452  else
2453  {
2454  /* Package the command with given data and send it to device */
2455  retVal = rlDriverExecuteSetApi(deviceMap, RL_RF_DYNAMIC_CONF_SET_MSG,
2456  RL_RF_CALIB_MON_TIME_UNIT_SB,
2457  (rlUInt8_t*)data,
2458  (rlUInt16_t)sizeof(rlRfCalMonTimeUntConf_t));
2459  }
2460 
2461  RL_LOGV_ARG0("rlRfSetCalMonTimeUnitConfig completes...\n");
2462 
2463  return retVal;
2464 }
2465 
2489 /* Sub block ID: 0x0088, ICD API: AWR_CAL_MON_FREQUENCY_LIMITS_SB */
2490 /* DesignId : MMWL_DesignId_054 */
2491 /* Requirements : AUTORADAR_REQ-893 */
2492 rlReturnVal_t rlRfSetCalMonFreqLimitConfig(rlUInt8_t deviceMap,
2494 {
2495  rlReturnVal_t retVal;
2496 
2497  RL_LOGV_ARG0("rlRfSetCalMonFreqLimitConfig starts...\n");
2498 
2499  /* check if deviceIndex is out of defined value */
2500  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || (RL_NULL_PTR == data))
2501  {
2502  /* set return error code */
2503  retVal = RL_RET_CODE_INVALID_INPUT;
2504  }
2505  else
2506  {
2507  /* Package the command with given data and send it to device */
2508  retVal = rlDriverExecuteSetApi(deviceMap, RL_RF_STATIC_CONF_SET_MSG,
2509  RL_RF_CAL_MON_FREQ_LIMIT_SB,
2510  (rlUInt8_t*)data,
2511  (rlUInt16_t)sizeof(rlRfCalMonFreqLimitConf_t));
2512  }
2513 
2514  RL_LOGV_ARG0("rlRfSetCalMonFreqLimitConfig completes...\n");
2515  return retVal;
2516 }
2517 
2537 /* Sub block ID: 0x0089, ICD API: AWR_RF_INIT_CALIBRATION_CONF_SB */
2538 /* DesignId : MMWL_DesignId_055 */
2539 /* Requirements : AUTORADAR_REQ-894 */
2540 rlReturnVal_t rlRfInitCalibConfig(rlUInt8_t deviceMap, rlRfInitCalConf_t* data)
2541 {
2542  rlReturnVal_t retVal;
2543 
2544  RL_LOGV_ARG0("rlRfInitCalibConfig starts...\n");
2545 
2546  /* check if deviceIndex is out of defined value */
2547  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || (RL_NULL_PTR == data))
2548  {
2549  /* set return error code */
2550  retVal = RL_RET_CODE_INVALID_INPUT;
2551  }
2552  else
2553  {
2554  /* Package the command with given data and send it to device */
2555  retVal = rlDriverExecuteSetApi(deviceMap, RL_RF_STATIC_CONF_SET_MSG,
2556  RL_RF_INIT_CALIB_CONF_SB,
2557  (rlUInt8_t*)data,
2558  (rlUInt16_t)sizeof(rlRfInitCalConf_t));
2559  }
2560 
2561  RL_LOGV_ARG0("rlRfInitCalibConfig completes...\n");
2562  return retVal;
2563 }
2564 
2589 /* Sub block ID: 0x010A, ICD API: AWR_RUN_TIME_CALIBRATION_CONF_AND_TRIGGER_SB */
2590 /* DesignId : MMWL_DesignId_056 */
2591 /* Requirements : AUTORADAR_REQ-895, AUTORADAR_REQ-1063 */
2592 rlReturnVal_t rlRfRunTimeCalibConfig(rlUInt8_t deviceMap, rlRunTimeCalibConf_t* data)
2593 {
2594  rlReturnVal_t retVal;
2595 
2596  RL_LOGV_ARG0("rlRfRunTimeCalibConfig starts...\n");
2597 
2598  /* check if deviceIndex is out of defined value */
2599  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || (RL_NULL_PTR == data))
2600  {
2601  /* set return error code */
2602  retVal = RL_RET_CODE_INVALID_INPUT;
2603  }
2604  else
2605  {
2606  /* Package the command with given data and send it to device */
2607  retVal = rlDriverExecuteSetApi(deviceMap, RL_RF_DYNAMIC_CONF_SET_MSG,
2608  RL_RF_RUN_TIME_CALIB_CONF_TRIG_SB,
2609  (rlUInt8_t*)data,
2610  (rlUInt16_t)sizeof(rlRunTimeCalibConf_t));
2611  }
2612 
2613  RL_LOGV_ARG0("rlRfRunTimeCalibConfig completes...\n");
2614  return retVal;
2615 }
2616 
2630 /* Sub block ID: 0x010C, ICD API: AWR_RX_GAIN_TEMPLUT_SET_SB */
2631 /* DesignId : MMWL_DesignId_057 */
2632 /* Requirements : AUTORADAR_REQ-896 */
2633 rlReturnVal_t rlRxGainTempLutSet(rlUInt8_t deviceMap, rlRxGainTempLutData_t *data)
2634 {
2635  rlReturnVal_t retVal;
2636 
2637  /* check if deviceIndex is out of defined value */
2638  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || (RL_NULL_PTR == data))
2639  {
2640  /* set return error code */
2641  retVal = RL_RET_CODE_INVALID_INPUT;
2642  }
2643  else
2644  {
2645  /* Package the command with given data and send it to device */
2646  retVal = rlDriverExecuteSetApi(deviceMap, RL_RF_DYNAMIC_CONF_SET_MSG,
2647  RL_RF_RX_GAIN_TEMPLUT_CONF_SB, (rlUInt8_t*)data,
2648  (rlUInt16_t)sizeof(rlRxGainTempLutData_t));
2649  }
2650  return retVal;
2651 }
2652 
2666 /* Sub block ID: 0x012C, ICD API: AWR_RX_GAIN_TEMPLUT_GET_SB */
2667 /* DesignId : MMWL_DesignId_058 */
2668 /* Requirements : AUTORADAR_REQ-897 */
2669 rlReturnVal_t rlRxGainTempLutGet(rlUInt8_t deviceMap, rlRxGainTempLutReadReq_t *inData,
2670  rlRxGainTempLutData_t *outData)
2671 {
2672  rlReturnVal_t retVal;
2673 
2674  RL_LOGV_ARG0("rlRxGainTempLutRead starts...\n");
2675 
2676  /* check if deviceIndex is out of defined value */
2677  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || \
2678  (RL_NULL_PTR == inData))
2679  {
2680  /* set return error code */
2681  retVal = RL_RET_CODE_INVALID_INPUT;
2682  RL_LOGE_ARG0("rlRxGainTempLutRead, Invalid device map\n");
2683  }
2684  else
2685  {
2686  /* Initialize Command and Response Sub Blocks */
2687  rlDriverMsg_t inMsg = {0};
2688  rlDriverMsg_t outMsg = {0};
2689 
2690  /* Initialize Command and Response Sub Blocks */
2691  rlPayloadSb_t inPayloadSb = {0};
2692  rlPayloadSb_t outPayloadSb = {0};
2693 
2694  /* Fill in-message Payload */
2695  rlDriverFillPayload(RL_RF_DYNAMIC_CONF_GET_MSG, RL_RF_RX_GAIN_TEMPLUT_CONF_SB,
2696  &inPayloadSb, (rlUInt8_t *)inData,
2697  (rlUInt16_t)sizeof(rlRxGainTempLutReadReq_t));
2698 
2699  /* Construct command packet */
2700  rlDriverConstructInMsg(RL_RF_DYNAMIC_CONF_GET_MSG, &inMsg, &inPayloadSb);
2701 
2702  /* Fill out-message Payload */
2703  rlDriverFillPayload(0U, 0U, &outPayloadSb, (rlUInt8_t*)outData,
2704  (rlUInt16_t)sizeof(rlRxGainTempLutData_t));
2705 
2706  /* Construct response packet */
2707  rlDriverConstructOutMsg(1U, &outMsg, &outPayloadSb);
2708 
2709  /* Send Command to mmWave Radar Device */
2710  retVal = rlDriverCmdInvoke(deviceMap, inMsg, &outMsg);
2711  }
2712  RL_LOGV_ARG0("rlRxGainTempLutRead ends...\n");
2713 
2714  return retVal;
2715 }
2716 
2728 /* Sub block ID: 0x010D, ICD API: AWR_TX_GAIN_TEMPLUT_SET_SB */
2729 /* DesignId : MMWL_DesignId_059 */
2730 /* Requirements : AUTORADAR_REQ-898 */
2731 rlReturnVal_t rlTxGainTempLutSet(rlUInt8_t deviceMap, rlTxGainTempLutData_t *data)
2732 {
2733  rlReturnVal_t retVal;
2734 
2735  /* check if deviceIndex is out of defined value */
2736  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || (RL_NULL_PTR == data))
2737  {
2738  /* set return error code */
2739  retVal = RL_RET_CODE_INVALID_INPUT;
2740  }
2741  else
2742  {
2743  /* Package the command with given data and send it to device */
2744  retVal = rlDriverExecuteSetApi(deviceMap, RL_RF_DYNAMIC_CONF_SET_MSG,
2745  RL_RF_TX_GAIN_TEMPLUT_CONF_SB, (rlUInt8_t*)data,
2746  (rlUInt16_t)sizeof(rlTxGainTempLutData_t));
2747  }
2748  return retVal;
2749 }
2750 
2764 /* Sub block ID: 0x012D, ICD API: AWR_TX_GAIN_TEMPLUT_GET_SB */
2765 /* DesignId : MMWL_DesignId_060 */
2766 /* Requirements : AUTORADAR_REQ-899 */
2767 rlReturnVal_t rlTxGainTempLutGet(rlUInt8_t deviceMap,
2769 {
2770  rlReturnVal_t retVal;
2771 
2772  RL_LOGV_ARG0("rlTxGainTempLutRead starts...\n");
2773 
2774  /* check if deviceIndex is out of defined value */
2775  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || \
2776  (RL_NULL_PTR == inData))
2777  {
2778  /* set return error code */
2779  retVal = RL_RET_CODE_INVALID_INPUT;
2780  RL_LOGE_ARG0("rlTxGainTempLutRead, Invalid device map\n");
2781  }
2782  else
2783  {
2784  /* Initialize Command and Response Sub Blocks */
2785  rlDriverMsg_t inMsg = {0};
2786  rlDriverMsg_t outMsg = {0};
2787 
2788  /* Initialize Command and Response Sub Blocks */
2789  rlPayloadSb_t inPayloadSb = {0};
2790  rlPayloadSb_t outPayloadSb = {0};
2791 
2792  /* Fill in-message Payload */
2793  rlDriverFillPayload(RL_RF_DYNAMIC_CONF_GET_MSG, RL_RF_TX_GAIN_TEMPLUT_CONF_SB,
2794  &inPayloadSb, (rlUInt8_t *)inData,
2795  (rlUInt16_t)sizeof(rlTxGainTempLutReadReq_t));
2796 
2797  /* Construct command packet */
2798  rlDriverConstructInMsg(RL_RF_DYNAMIC_CONF_GET_MSG, &inMsg, &inPayloadSb);
2799 
2800  /* Fill out-message Payload */
2801  rlDriverFillPayload(0U, 0U, &outPayloadSb, (rlUInt8_t*)outData,
2802  (rlUInt16_t)sizeof(rlTxGainTempLutData_t));
2803 
2804  /* Construct response packet */
2805  rlDriverConstructOutMsg(1U, &outMsg, &outPayloadSb);
2806 
2807  /* Send Command to mmWave Radar Device */
2808  retVal = rlDriverCmdInvoke(deviceMap, inMsg, &outMsg);
2809  }
2810  RL_LOGV_ARG0("rlTxGainTempLutRead ends...\n");
2811 
2812  return retVal;
2813 }
2814 
2842 /* Sub block ID: 0x008A, ICD API: AWR_CAL_MON_FREQUENCY_TX_POWER_LIMITS_SB */
2843 /* DesignId : MMWL_DesignId_066 */
2844 /* Requirements : AUTORADAR_REQ-905 */
2845 rlReturnVal_t rlRfTxFreqPwrLimitConfig(rlUInt8_t deviceMap, rlRfTxFreqPwrLimitMonConf_t* data)
2846 {
2847  rlReturnVal_t retVal;
2848 
2849  /* check if deviceIndex is out of defined value */
2850  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || \
2851  (RL_NULL_PTR == data))
2852  {
2853  /* set return error code */
2854  retVal = RL_RET_CODE_INVALID_INPUT;
2855  }
2856  else
2857  {
2858  /* Package the command with given data and send it to device */
2859  retVal = rlDriverExecuteSetApi(deviceMap, RL_RF_STATIC_CONF_SET_MSG,
2860  RL_RF_TX_FREQ_PWR_LIMIT_SB,
2861  (rlUInt8_t*)data,
2862  (rlUInt16_t)sizeof(rlRfTxFreqPwrLimitMonConf_t));
2863  }
2864  return retVal;
2865 }
2866 
2898 /* Sub block ID: 0x010E, ICD API: AWR_LOOPBACK_BURST_CONF_SET_SB */
2899 /* DesignId : MMWL_DesignId_062 */
2900 /* Requirements : AUTORADAR_REQ-901 */
2901 rlReturnVal_t rlSetLoopBckBurstCfg(rlUInt8_t deviceMap, rlLoopbackBurst_t *data)
2902 {
2903  rlReturnVal_t retVal;
2904 
2905  /* check if deviceIndex is out of defined value */
2906  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || (RL_NULL_PTR == data))
2907  {
2908  /* set return error code */
2909  retVal = RL_RET_CODE_INVALID_INPUT;
2910  }
2911  else
2912  {
2913  /* Package the command with given data and send it to device */
2914  retVal = rlDriverExecuteSetApi(deviceMap, RL_RF_DYNAMIC_CONF_SET_MSG,
2915  RL_RF_LB_BURST_CFG_SET_SB, (rlUInt8_t*)data,
2916  (rlUInt16_t)sizeof(rlLoopbackBurst_t));
2917  }
2918  return retVal;
2919 }
2920 
2938 /* Sub block ID: 0x010F, ICD API: AWR_DYN_CHIRP_CONF_SET_SB */
2939 /* DesignId : MMWL_DesignId_063 */
2940 /* Requirements : AUTORADAR_REQ-902 */
2941 rlReturnVal_t rlSetDynChirpCfg(rlUInt8_t deviceMap, rlUInt16_t segCnt,
2942  rlDynChirpCfg_t **data)
2943 {
2944  rlReturnVal_t retVal;
2945 
2946  /* check if deviceIndex is out of defined value */
2947  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || (RL_NULL_PTR == data) || \
2948  (segCnt == 0U))
2949  {
2950  /* set return error code */
2951  retVal = RL_RET_CODE_INVALID_INPUT;
2952  }
2953  else
2954  {
2955  /* Initialize Command and Response Sub Blocks */
2956  rlDriverMsg_t inMsg;
2957  rlDriverMsg_t outMsg = {0};
2958 
2959  /* Index and other paramerters to send multiple sub blocks in one/more commands chunk */
2960  rlUInt16_t sbLen, maxSbCntInMsg, sbCntInMsg, numChnkOfMsg, lastSbCntInMsg, loopCnt, indx;
2961 
2962 
2963  /* Initialize Command and Response Sub Blocks */
2964  rlPayloadSb_t inPayloadSb[RL_CMD_PL_LEN_MAX/(sizeof(rlDynChirpCfg_t) + \
2965  RL_SBC_ID_SIZE + RL_SBC_LEN_SIZE)];
2966 
2967  /* single sub-block length for chirp config API */
2968  sbLen = (rlUInt16_t)(sizeof(rlDynChirpCfg_t) + (RL_SBC_LEN_SIZE + RL_SBC_ID_SIZE));
2969 
2970 
2971  /* get Max Sub Block count */
2972  /* AR_CODE_REVIEW MR:D.4.1 <APPROVED> "sbLen can not be zero" */
2973  /*LDRA_INSPECTED 127 D */
2974  maxSbCntInMsg = (RL_CMD_PL_LEN_MAX /sbLen);
2975 
2976  retVal = RL_RET_CODE_OK;
2977  /* if requested count of chirpConfig is within one Message packet */
2978  if (segCnt <= maxSbCntInMsg)
2979  {
2980  sbCntInMsg = segCnt;
2981  numChnkOfMsg = 1U;
2982  lastSbCntInMsg = 0U;
2983  }
2984  else
2985  {
2986  sbCntInMsg = maxSbCntInMsg;
2987  numChnkOfMsg = segCnt / maxSbCntInMsg;
2988  lastSbCntInMsg = segCnt % maxSbCntInMsg;
2989  }
2990 
2991  /* Fill in-message packet */
2992  rlDriverConstructInMsg(RL_RF_DYNAMIC_CONF_SET_MSG, &inMsg, &inPayloadSb[0]);
2993 
2994  loopCnt = (lastSbCntInMsg == 0U) ? numChnkOfMsg : (numChnkOfMsg + 1U);
2995 
2996  while (retVal == RL_RET_CODE_OK)
2997  {
2998  /* all full messages have been sent, then send last partial message */
2999  if ((loopCnt == 1U) && (lastSbCntInMsg != 0U))
3000  {
3001  inMsg.opcode.nsbc = lastSbCntInMsg;
3002  }
3003  else
3004  {
3005  inMsg.opcode.nsbc = sbCntInMsg;
3006  }
3007 
3008  for (indx = 0U; indx < inMsg.opcode.nsbc; indx++)
3009  {
3010  /* Set Command Sub Block*/
3011  /* AR_CODE_REVIEW MR:R.2.2 <APPROVED> "Values are used by called function. \
3012  LDRA Tool Issue" */
3013  /*LDRA_INSPECTED 105 D */
3014  inPayloadSb[indx].sbid = RL_GET_UNIQUE_SBID(RL_RF_DYNAMIC_CONF_SET_MSG,
3015  RL_RF_DYN_CHIRP_CFG_SET_SB);
3016  /* AR_CODE_REVIEW MR:R.2.2 <APPROVED> "Values are used by called function. \
3017  LDRA Tool Issue" */
3018  /*LDRA_INSPECTED 105 D */
3019  inPayloadSb[indx].len = (rlUInt16_t)sizeof(rlDynChirpCfg_t);
3020  /* AR_CODE_REVIEW MR:R.2.2 <APPROVED> "Values are used by called function. \
3021  LDRA Tool Issue" */
3022  /*LDRA_INSPECTED 105 D */
3023  inPayloadSb[indx].pSblkData = (rlUInt8_t*)(*data);
3024 
3025  /*AR_CODE_REVIEW MR:R.18.1 <APPROVED> "require pointer increment to jump to \
3026  next Config */
3027  /*LDRA_INSPECTED 567 S */
3028  data++;
3029  }
3030  /* Send Command to mmWave Radar Device */
3031  retVal += rlDriverCmdInvoke(deviceMap, inMsg, &outMsg);
3032  loopCnt--;
3033 
3034  if (loopCnt == 0U)
3035  {
3036  break;
3037  }
3038  }
3039  }
3040  return retVal;
3041 }
3042 
3062 /* Sub block ID: 0x0111, ICD API: AWR_DYN_CHIRP_ENABLE_SB */
3063 /* DesignId : MMWL_DesignId_064 */
3064 /* Requirements : AUTORADAR_REQ-903 */
3065 rlReturnVal_t rlSetDynChirpEn(rlUInt8_t deviceMap, rlDynChirpEnCfg_t *data)
3066 {
3067  rlReturnVal_t retVal;
3068 
3069  /* check if deviceIndex is out of defined value */
3070  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || (RL_NULL_PTR == data))
3071  {
3072  /* set return error code */
3073  retVal = RL_RET_CODE_INVALID_INPUT;
3074  }
3075  else
3076  {
3077  /* Package the command with given data and send it to device */
3078  retVal = rlDriverExecuteSetApi(deviceMap, RL_RF_DYNAMIC_CONF_SET_MSG,
3079  RL_RF_DYN_CHIRP_CFG_EN_SB, (rlUInt8_t*)data,
3080  (rlUInt16_t)sizeof(rlDynChirpEnCfg_t));
3081  }
3082  return retVal;
3083 }
3084 
3111 /* Sub block ID: 0x0110, ICD API: AWR_DYN_PERCHIRP_PHASESHIFTER_CONF_SET_SB */
3112 /* DesignId : MMWL_DesignId_065 */
3113 /* Requirements : AUTORADAR_REQ-904 */
3114 rlReturnVal_t rlSetDynPerChirpPhShifterCfg(rlUInt8_t deviceMap, rlUInt16_t segCnt,
3115  rlDynPerChirpPhShftCfg_t **data)
3116 {
3117  rlReturnVal_t retVal;
3118 
3119  /* check if deviceIndex is out of defined value */
3120  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || (RL_NULL_PTR == data) || \
3121  (segCnt == 0U))
3122  {
3123  /* set return error code */
3124  retVal = RL_RET_CODE_INVALID_INPUT;
3125  }
3126  else
3127  {
3128  /* Initialize Command and Response Sub Blocks */
3129  rlDriverMsg_t inMsg;
3130  rlDriverMsg_t outMsg = {0};
3131 
3132  /* Index and other paramerters to send multiple sub blocks in one/more commands chunk */
3133  rlUInt16_t sbLen, maxSbCntInMsg, sbCntInMsg, numChnkOfMsg, lastSbCntInMsg, loopCnt, indx;
3134 
3135  /* Initialize Command and Response Sub Blocks */
3136  rlPayloadSb_t inPayloadSb[RL_CMD_PL_LEN_MAX/(sizeof(rlDynPerChirpPhShftCfg_t) + \
3137  RL_SBC_ID_SIZE + RL_SBC_LEN_SIZE)];
3138 
3139  /* single sub-block length for chirp config API */
3140  sbLen = (rlUInt16_t)(sizeof(rlDynPerChirpPhShftCfg_t) + \
3141  (RL_SBC_LEN_SIZE + RL_SBC_ID_SIZE));
3142 
3143  /* get Max Sub Block count */
3144  /* AR_CODE_REVIEW MR:D.4.1 <APPROVED> "sbLen can not be zero" */
3145  /*LDRA_INSPECTED 127 D */
3146  maxSbCntInMsg = (RL_CMD_PL_LEN_MAX /sbLen);
3147 
3148  retVal = RL_RET_CODE_OK;
3149  /* if requested count of chirpConfig is within one Message packet */
3150  if (segCnt <= maxSbCntInMsg)
3151  {
3152  sbCntInMsg = segCnt;
3153  numChnkOfMsg = 1U;
3154  lastSbCntInMsg = 0U;
3155  }
3156  else
3157  {
3158  sbCntInMsg = maxSbCntInMsg;
3159  numChnkOfMsg = segCnt / maxSbCntInMsg;
3160  lastSbCntInMsg = segCnt % maxSbCntInMsg;
3161  }
3162 
3163  /* Fill in-message packet */
3164  rlDriverConstructInMsg(RL_RF_DYNAMIC_CONF_SET_MSG, &inMsg, &inPayloadSb[0]);
3165 
3166  loopCnt = (lastSbCntInMsg == 0U) ? numChnkOfMsg : (numChnkOfMsg + 1U);
3167 
3168  while (retVal == RL_RET_CODE_OK)
3169  {
3170  /* all full messages have been sent, then send last partial message */
3171  if ((loopCnt == 1U) && (lastSbCntInMsg != 0U))
3172  {
3173  inMsg.opcode.nsbc = lastSbCntInMsg;
3174  }
3175  else
3176  {
3177  inMsg.opcode.nsbc = sbCntInMsg;
3178  }
3179 
3180  for (indx = 0U; indx < inMsg.opcode.nsbc; indx++)
3181  {
3182  /* Set Command Sub Block*/
3183  /* AR_CODE_REVIEW MR:R.2.2 <APPROVED> "Values are used by called function.\
3184  LDRA Tool Issue" */
3185  /*LDRA_INSPECTED 105 D */
3186  inPayloadSb[indx].sbid = RL_GET_UNIQUE_SBID(RL_RF_DYNAMIC_CONF_SET_MSG,
3187  RL_RF_DYN_PERCHIRP_PHSHFT_CFG_SET_SB);
3188  /* AR_CODE_REVIEW MR:R.2.2 <APPROVED> "Values are used by called function. \
3189  LDRA Tool Issue" */
3190  /*LDRA_INSPECTED 105 D */
3191  inPayloadSb[indx].len = (rlUInt16_t)sizeof(rlDynPerChirpPhShftCfg_t);
3192  /* AR_CODE_REVIEW MR:R.2.2 <APPROVED> "Values are used by called function. \
3193  LDRA Tool Issue" */
3194  /*LDRA_INSPECTED 105 D */
3195  inPayloadSb[indx].pSblkData = (rlUInt8_t*)(*data);
3196  /*AR_CODE_REVIEW MR:R.18.1 <APPROVED> "require pointer increment to jump to \
3197  next Config */
3198  /*LDRA_INSPECTED 567 S */
3199  data++;
3200  }
3201  /* Send Command to mmWave Radar Device */
3202  retVal += rlDriverCmdInvoke(deviceMap, inMsg, &outMsg);
3203  loopCnt--;
3204 
3205  if (loopCnt == 0U)
3206  {
3207  break;
3208  }
3209  }
3210  }
3211  return retVal;
3212 }
3213 
3239 /* Sub block ID: 0x008B, ICD API: AWR_CAL_DATA_RESTORE_SB */
3240 /* DesignId : MMWL_DesignId_067 */
3241 /* Requirements : AUTORADAR_REQ-906 */
3242 rlReturnVal_t rlRfCalibDataRestore(rlUInt8_t deviceMap, rlCalibrationData_t *data)
3243 {
3244  rlReturnVal_t retVal;
3245  rlUInt8_t idx;
3246 
3247  /* check if deviceIndex is out of defined value */
3248  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || (RL_NULL_PTR == data))
3249  {
3250  /* set return error code */
3251  retVal = RL_RET_CODE_INVALID_INPUT;
3252  }
3253  else
3254  {
3255  /* Initialize Command and Response Sub Blocks */
3256  rlDriverMsg_t inMsg = {0};
3257  rlDriverMsg_t outMsg = {0};
3258  rlPayloadSb_t inPayloadSb = {0};
3259  rlPayloadSb_t outPayloadSb = {0};
3260  /* set return value to zero by default */
3261  retVal = RL_RET_CODE_OK;
3262  /* Invoke Set Calibration data command for RL_MAX_CALIB_DATA_CHUNK chunks */
3263  for (idx = 0U; idx < RL_MAX_CALIB_DATA_CHUNK; idx++)
3264  {
3265  /* Construct command packet */
3266  rlDriverConstructInMsg(RL_RF_STATIC_CONF_SET_MSG, &inMsg, &inPayloadSb);
3267  /* Fill in-message Payload */
3268  /*AR_CODE_REVIEW MR:R.18.1 <APPROVED> "require pointer increment to jump to
3269  next calibData */
3270  /*AR_CODE_REVIEW MR:R.18.1 <APPROVED> "require pointer increment to jump to
3271  next calibData */
3272  /*LDRA_INSPECTED 87 S */
3273  /*LDRA_INSPECTED 567 S */
3274  rlDriverFillPayload(RL_RF_STATIC_CONF_SET_MSG, RL_RF_CAL_DATA_RD_WR_SB, &inPayloadSb,
3275  (rlUInt8_t*)(&data->calibChunk[idx]),
3276  (rlUInt16_t)sizeof(rlCalDataStore_t));
3277 
3278  /* Construct response packet */
3279  rlDriverConstructOutMsg(1U, &outMsg, &outPayloadSb);
3280  /* Fill in-message Payload */
3281  rlDriverFillPayload(0U, 0U, &outPayloadSb, NULL, 0U);
3282 
3283  /* Send Command to mmWave Radar Device */
3284  retVal += rlDriverCmdInvoke(deviceMap, inMsg, &outMsg);
3285  /* check for return value */
3286  if (RL_RET_CODE_OK != retVal)
3287  {
3288  /* If command invoke is failed then terminate this loop */
3289  break;
3290  }
3291  }
3292 
3293  }
3294  return retVal;
3295 }
3296 
3321 /* Sub block ID: 0x00AB, ICD API: AWR_CAL_DATA_SAVE_SB */
3322 /* DesignId : MMWL_DesignId_068 */
3323 /* Requirements : AUTORADAR_REQ-906 */
3324 rlReturnVal_t rlRfCalibDataStore(rlUInt8_t deviceMap, rlCalibrationData_t *data)
3325 {
3326  rlReturnVal_t retVal;
3327 
3328  /* check if deviceIndex is out of defined value */
3329  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || (RL_NULL_PTR == data))
3330  {
3331  /* set return error code */
3332  retVal = RL_RET_CODE_INVALID_INPUT;
3333  }
3334  else
3335  {
3336  /* Initialize Command and Response Sub Blocks */
3337  rlDriverMsg_t inMsg = {0};
3338  rlDriverMsg_t outMsg = {0};
3339  rlPayloadSb_t inPayloadSb = {0};
3340  rlPayloadSb_t outPayloadSb = {0};
3341  rlCalDataGetCfg_t caldataGetCfg = {0U};
3342  rlUInt8_t idx;
3343  /* set return value to zero by default */
3344  retVal = RL_RET_CODE_OK;
3345  /* Invoke Get Calibration data command for RL_MAX_CALIB_DATA_CHUNK chunks */
3346  for (idx = 0U; idx < RL_MAX_CALIB_DATA_CHUNK; idx++)
3347  {
3348  /* Construct command packet */
3349  rlDriverConstructInMsg(RL_RF_STATIC_CONF_GET_MSG, &inMsg, &inPayloadSb);
3350  /* Fill in-message Payload */
3351  rlDriverFillPayload(RL_RF_STATIC_CONF_GET_MSG, RL_RF_CAL_DATA_RD_WR_SB, &inPayloadSb,
3352  (rlUInt8_t*)&caldataGetCfg, (rlUInt16_t)sizeof(rlCalDataGetCfg_t));
3353 
3354  /* Construct response packet */
3355  rlDriverConstructOutMsg(1U, &outMsg, &outPayloadSb);
3356  /* Fill in-message Payload */
3357  /*AR_CODE_REVIEW MR:R.18.1 <APPROVED> "require pointer increment to jump to
3358  next calibData */
3359  /*AR_CODE_REVIEW MR:R.18.4 <APPROVED> "require pointer increment to jump to
3360  next calibData */
3361  /*LDRA_INSPECTED 87 S */
3362  /*LDRA_INSPECTED 567 S */
3363  rlDriverFillPayload(0U, 0U, &outPayloadSb, (rlUInt8_t*)(&data->calibChunk[idx]), 0U);
3364 
3365  /* Send Command to mmWave Radar Device */
3366  retVal += rlDriverCmdInvoke(deviceMap, inMsg, &outMsg);
3367  /* check for return value */
3368  if (RL_RET_CODE_OK != retVal)
3369  {
3370  /* If command invoke is failed then terminate this loop */
3371  break;
3372  }
3373  /* increment Chunk ID for next Get Command */
3374  caldataGetCfg.chunkId++;
3375  }
3376  }
3377  return retVal;
3378 }
3379 
3403 /* Sub block ID: 0x010B, ICD API: AWR_DIGITAL_COMP_EST_CONTROL_SB */
3404 /* DesignId : MMWL_DesignId_061 */
3405 /* Requirements : AUTORADAR_REQ-900 */
3406 rlReturnVal_t rlRfInterRxGainPhaseConfig(rlUInt8_t deviceMap,
3407  rlInterRxGainPhConf_t* data)
3408 {
3409  rlReturnVal_t retVal;
3410 
3411  /* check if deviceIndex is out of defined value */
3412  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || (RL_NULL_PTR == data))
3413  {
3414  /* set return error code */
3415  retVal = RL_RET_CODE_INVALID_INPUT;
3416  }
3417  else
3418  {
3419  /* Package the command with given data and send it to device */
3420  retVal = rlDriverExecuteSetApi(deviceMap, RL_RF_DYNAMIC_CONF_SET_MSG,
3421  RL_RF_DIG_COMP_EST_CTRL_SB, (rlUInt8_t*)data,
3422  (rlUInt16_t)sizeof(rlInterRxGainPhConf_t));
3423  }
3424  return retVal;
3425 }
3426 
3437 /* Sub block ID: 0x0224, ICD API: AWR_RF_BOOTUPBIST_STATUS_GET_SB */
3438 /* DesignId : MMWL_DesignId_096 */
3439 /* Requirements : AUTORADAR_REQ-911 */
3440 rlReturnVal_t rlGetRfBootupStatus(rlUInt8_t deviceMap, rlRfBootStatusCfg_t *data)
3441 {
3442  rlReturnVal_t retVal;
3443 
3444  /* check for NULL pointer */
3445  if (data == RL_NULL_PTR)
3446  {
3447  /* set error code if data pointer is passed NULL */
3448  retVal = RL_RET_CODE_NULL_PTR;
3449  }
3450  else
3451  {
3452  /* Package the command with given data and send it to device */
3453  retVal = rlDriverExecuteGetApi(deviceMap, RL_RF_STATUS_GET_MSG,
3454  RL_RF_BOOTUP_BIST_STATUS_SB, (rlUInt8_t*)data, 0U);
3455  }
3456 
3457  return retVal;
3458 }
3459 
3477 /* Sub block ID: 0x0112, ICD API: AWR_INTERCHIRP_BLOCKCONTROLS_SB */
3478 /* DesignId : MMWL_DesignId_097 */
3479 /* Requirements : AUTORADAR_REQ-912 */
3480 rlReturnVal_t rlSetInterChirpBlkCtrl(rlUInt8_t deviceMap,
3482 {
3483  rlReturnVal_t retVal;
3484 
3485  /* check if deviceIndex is out of defined value */
3486  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || (RL_NULL_PTR == data))
3487  {
3488  /* set return error code */
3489  retVal = RL_RET_CODE_INVALID_INPUT;
3490  }
3491  else
3492  {
3493  /* Package the command with given data and send it to device */
3494  retVal = rlDriverExecuteSetApi(deviceMap, RL_RF_DYNAMIC_CONF_SET_MSG,
3495  RL_RF_INTERCHIRP_BLOCK_CTRL_SB, (rlUInt8_t*)data,
3496  (rlUInt16_t)sizeof(rlInterChirpBlkCtrlCfg_t));
3497  }
3498  return retVal;
3499 }
3500 
3529 /* Sub block ID: 0x0113, ICD API: AWR_SUBFRAME_START_CONF_SB */
3530 /* DesignId : MMWL_DesignId_107 */
3531 /* Requirements : AUTORADAR_REQ-938, AUTORADAR_REQ-1021 */
3532 rlReturnVal_t rlSetSubFrameStart(rlUInt8_t deviceMap,
3533  rlSubFrameStartCfg_t *data)
3534 {
3535  rlReturnVal_t retVal;
3536 
3537  /* check if deviceIndex is out of defined value */
3538  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || (RL_NULL_PTR == data))
3539  {
3540  /* set return error code */
3541  retVal = RL_RET_CODE_INVALID_INPUT;
3542  }
3543  else
3544  {
3545  /* Package the command with given data and send it to device */
3546  retVal = rlDriverExecuteSetApi(deviceMap, RL_RF_DYNAMIC_CONF_SET_MSG,
3547  RL_RF_SUBFRAME_START_SB, (rlUInt8_t*)data,
3548  (rlUInt16_t)sizeof(rlSubFrameStartCfg_t));
3549  }
3550  return retVal;
3551 }
3552 
3571 /* Sub block ID: 0x008C, ICD API: AWR_PHASE_SHIFTER_CAL_DATA_RESTORE_SB */
3572 /* DesignId : MMWL_DesignId_109 */
3573 /* Requirements : AUTORADAR_REQ-1003 */
3574 rlReturnVal_t rlRfPhShiftCalibDataRestore(rlUInt8_t deviceMap, rlPhShiftCalibrationData_t *data)
3575 {
3576  rlReturnVal_t retVal;
3577  rlUInt8_t idx;
3578 
3579  /* check if deviceIndex is out of defined value */
3580  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || (RL_NULL_PTR == data))
3581  {
3582  /* set return error code */
3583  retVal = RL_RET_CODE_INVALID_INPUT;
3584  }
3585  else
3586  {
3587  /* Initialize Command and Response Sub Blocks */
3588  rlDriverMsg_t inMsg = { 0 };
3589  rlDriverMsg_t outMsg = { 0 };
3590  rlPayloadSb_t inPayloadSb = { 0 };
3591  rlPayloadSb_t outPayloadSb = { 0 };
3592  /* set return value to zero by default */
3593  retVal = RL_RET_CODE_OK;
3594  /* Invoke Set Calibration data command for RL_MAX_CALIB_DATA_CHUNK chunks */
3595  for (idx = 0U; idx < RL_TX_CNT; idx++)
3596  {
3597  /* Construct command packet */
3598  rlDriverConstructInMsg(RL_RF_STATIC_CONF_SET_MSG, &inMsg, &inPayloadSb);
3599  if (idx == (RL_TX_CNT - 1U))
3600  {
3601  data->PhShiftcalibChunk[idx].calibApply = 1U;
3602  }
3603  else
3604  {
3605  data->PhShiftcalibChunk[idx].calibApply = 0U;
3606  }
3607  data->PhShiftcalibChunk[idx].txIndex = idx;
3608  /* Fill in-message Payload */
3609  /*AR_CODE_REVIEW MR:R.18.1 <REVIEWED> "require pointer increment to jump to
3610  next calibData */
3611  /*AR_CODE_REVIEW MR:R.18.1 <REVIEWED> "require pointer increment to jump to
3612  next calibData */
3613  /*LDRA_INSPECTED 87 S */
3614  /*LDRA_INSPECTED 567 S */
3615  rlDriverFillPayload(RL_RF_STATIC_CONF_SET_MSG, RL_RF_PH_SHIFT_CAL_DATA_RD_WR_SB,
3616  &inPayloadSb, (rlUInt8_t*)(&data->PhShiftcalibChunk[idx]),
3617  (rlUInt16_t)sizeof(rlPhShiftCalibrationStore_t));
3618 
3619  /* Construct response packet */
3620  rlDriverConstructOutMsg(1U, &outMsg, &outPayloadSb);
3621  /* Fill in-message Payload */
3622  rlDriverFillPayload(0U, 0U, &outPayloadSb, NULL, 0U);
3623 
3624  /* Send Command to mmWave Radar Device */
3625  retVal += rlDriverCmdInvoke(deviceMap, inMsg, &outMsg);
3626  /* check for return value */
3627  if (RL_RET_CODE_OK != retVal)
3628  {
3629  /* If command invoke is failed then terminate this loop */
3630  break;
3631  }
3632  }
3633 
3634  }
3635  return retVal;
3636 }
3637 
3657 /* Sub block ID: 0x00AC, ICD API: AWR_PHASE_SHIFTER_CAL_DATA_SAVE_SB */
3658 /* DesignId : MMWL_DesignId_108 */
3659 /* Requirements : AUTORADAR_REQ-1003 */
3660 rlReturnVal_t rlRfPhShiftCalibDataStore(rlUInt8_t deviceMap, rlPhShiftCalibrationData_t *data)
3661 {
3662  rlReturnVal_t retVal;
3663 
3664  /* check if deviceIndex is out of defined value */
3665  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || (RL_NULL_PTR == data))
3666  {
3667  /* set return error code */
3668  retVal = RL_RET_CODE_INVALID_INPUT;
3669  }
3670  else
3671  {
3672  /* Initialize Command and Response Sub Blocks */
3673  rlDriverMsg_t inMsg = {0};
3674  rlDriverMsg_t outMsg = {0};
3675  rlPayloadSb_t inPayloadSb = {0};
3676  rlPayloadSb_t outPayloadSb = {0};
3677  rlPhShiftCalDataGetCfg_t phShifterCaldataGetCfg = {0U};
3678  rlUInt8_t idx;
3679  /* set return value to zero by default */
3680  /* AR_CODE_REVIEW MR:R.2.2 <REVIEWED> "retVal initialized to 0 if not it means error" */
3681  /*LDRA_INSPECTED 8 D */
3682  retVal = RL_RET_CODE_OK;
3683  /* Invoke Get Calibration data command for RL_MAX_CALIB_DATA_CHUNK chunks */
3684  for (idx = 0U; idx < RL_TX_CNT; idx++)
3685  {
3686  if ((RL_NULL_PTR != &data->PhShiftcalibChunk[idx]))
3687  {
3688  phShifterCaldataGetCfg.txIndex = idx;
3689  /* Construct command packet */
3690  rlDriverConstructInMsg(RL_RF_STATIC_CONF_GET_MSG, &inMsg, &inPayloadSb);
3691  /* Fill in-message Payload */
3692  rlDriverFillPayload(RL_RF_STATIC_CONF_GET_MSG, RL_RF_PH_SHIFT_CAL_DATA_RD_WR_SB,
3693  &inPayloadSb, (rlUInt8_t*)&phShifterCaldataGetCfg,
3694  (rlUInt16_t)sizeof(rlPhShiftCalDataGetCfg_t));
3695 
3696  /* Construct response packet */
3697  rlDriverConstructOutMsg(1U, &outMsg, &outPayloadSb);
3698  /* Fill in-message Payload */
3699  /*AR_CODE_REVIEW MR:R.18.1 <REVIEWED> "require pointer increment to jump to
3700  next calibData */
3701  /*AR_CODE_REVIEW MR:R.18.4 <REVIEWED> "require pointer increment to jump to
3702  next calibData */
3703  /*LDRA_INSPECTED 87 S */
3704  /*LDRA_INSPECTED 567 S */
3705  rlDriverFillPayload(0U, 0U, &outPayloadSb,
3706  (rlUInt8_t*)(&data->PhShiftcalibChunk[idx]), 0U);
3707 
3708  /* Send Command to mmWave Radar Device */
3709  retVal += rlDriverCmdInvoke(deviceMap, inMsg, &outMsg);
3710  /* check for return value */
3711  if (RL_RET_CODE_OK != retVal)
3712  {
3713  /* If command invoke is failed then terminate this loop */
3714  break;
3715  }
3716  }
3717  }
3718  }
3719  return retVal;
3720 }
3721 
3732 /* Sub block ID: 0x0223, ICD API: AWR_RF_DIEID_GET_SB */
3733 /* DesignId : MMWL_DesignId_110 */
3734 /* Requirements : AUTORADAR_REQ-1004, AUTORADAR_REQ-1027 */
3735 rlReturnVal_t rlGetRfDieId(rlUInt8_t deviceMap, rlRfDieIdCfg_t *data)
3736 {
3737  rlReturnVal_t retVal;
3738 
3739  /* check for NULL pointer */
3740  if (data == RL_NULL_PTR)
3741  {
3742  /* set error code if data pointer is passed NULL */
3743  retVal = RL_RET_CODE_NULL_PTR;
3744  }
3745  else
3746  {
3747  /* Package the command with given data and send it to device */
3748  retVal = rlDriverExecuteGetApi(deviceMap, RL_RF_STATUS_GET_MSG,
3749  RL_RF_DIEID_STATUS_SB, (rlUInt8_t*)data, 0U);
3750  }
3751 
3752  return retVal;
3753 }
3754 
3765 /* Sub block ID: 0x0221, ICD API: AWR_RF_CPUFAULT_STATUS_GET_SB */
3766 /* DesignId : MMWL_DesignId_123 */
3767 /* Requirements : AUTORADAR_REQ-1039, AUTORADAR_REQ-1060 */
3768 rlReturnVal_t rlRfGetCpuFault(rlUInt8_t deviceMap, rlCpuFault_t *data)
3769 {
3770  rlReturnVal_t retVal;
3771 
3772  RL_LOGV_ARG0("rlRfGetCpuFault starts...\n");
3773 
3774  /* check if deviceIndex is out of defined value */
3775  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || \
3776  (RL_NULL_PTR == data))
3777  {
3778  /* set error code if DeviceMAP is invalid or data pointer is null */
3779  retVal = RL_RET_CODE_INVALID_INPUT;
3780  RL_LOGE_ARG0("Invalid input");
3781  }
3782  else
3783  {
3784  /* Package the command with given data and send it to device */
3785  retVal = rlDriverExecuteGetApi(deviceMap, RL_RF_STATUS_GET_MSG,
3786  RL_RF_RFCPUFAULT_STATUS_SB, (rlUInt8_t*)data,
3787  (rlUInt16_t)sizeof(rlCpuFault_t));
3788  }
3789  RL_LOGV_ARG0("rlRfGetCpuFault ends...\n");
3790 
3791  return retVal;
3792 }
3793 
3804 /* Sub block ID: 0x0222, ICD API: AWR_RF_ESMFAULT_STATUS_GET_SB */
3805 /* DesignId : MMWL_DesignId_123 */
3806 /* Requirements : AUTORADAR_REQ-1039 */
3807 rlReturnVal_t rlRfGetEsmFault(rlUInt8_t deviceMap, rlBssEsmFault_t *data)
3808 {
3809  rlReturnVal_t retVal;
3810 
3811  RL_LOGV_ARG0("rlRfGetEsmFault starts...\n");
3812 
3813  /* check if deviceIndex is out of defined value */
3814  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || \
3815  (RL_NULL_PTR == data))
3816  {
3817  /* set error code if DeviceMAP is invalid or data pointer is null */
3818  retVal = RL_RET_CODE_INVALID_INPUT;
3819  RL_LOGE_ARG0("Invalid input");
3820  }
3821  else
3822  {
3823  /* Package the command with given data and send it to device */
3824  retVal = rlDriverExecuteGetApi(deviceMap, RL_RF_STATUS_GET_MSG,
3825  RL_RF_RFESMFAULT_STATUS_SB, (rlUInt8_t*)data,
3826  (rlUInt16_t)sizeof(rlBssEsmFault_t));
3827  }
3828  RL_LOGV_ARG0("rlRfGetEsmFault ends...\n");
3829 
3830  return retVal;
3831 }
3832 
3911 /* Sub block ID: 0x0115, ICD API: AWR_ADVANCE_CHIRP_CONF_SB */
3912 /* DesignId : MMWL_DesignId_129 */
3913 /* Requirements : AUTORADAR_REQ-1050, AUTORADAR_REQ-1043 */
3914 rlReturnVal_t rlSetAdvChirpConfig(rlUInt8_t deviceMap, rlAdvChirpCfg_t *data)
3915 {
3916  rlReturnVal_t retVal;
3917 
3918  RL_LOGV_ARG0("rlSetAdvChirpConfig starts...\n");
3919 
3920  /* check if deviceIndex is out of defined value */
3921  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || (RL_NULL_PTR == data))
3922  {
3923  /* set return error code */
3924  retVal = RL_RET_CODE_INVALID_INPUT;
3925  RL_LOGE_ARG0("rlSetAdvChirpConfig, Invalid device map\n");
3926  }
3927  else
3928  {
3929  /* Package the command with given data and send it to device */
3930  retVal = rlDriverExecuteSetApi(deviceMap, RL_RF_DYNAMIC_CONF_SET_MSG,
3931  RL_RF_ADV_CHIRP_CFG_SET_SB,
3932  (rlUInt8_t*)(data),
3933  (rlUInt16_t)sizeof(rlAdvChirpCfg_t));
3934  }
3935 
3936  RL_LOGV_ARG0("rlSetAdvChirpConfig ends...\n");
3937 
3938  return retVal;
3939 }
3940 
3982 /* Sub block ID: 0x0117, ICD API: AWR_MONITOR_TYPE_TRIG_CONF_SB */
3983 /* DesignId : MMWL_DesignId_125 */
3984 /* Requirements : AUTORADAR_REQ-1055 */
3985 rlReturnVal_t rlMonTypeTrigConfig(rlUInt8_t deviceMap, rlMonTypeTrigCfg_t *data)
3986 {
3987  rlReturnVal_t retVal;
3988 
3989  RL_LOGV_ARG0("rlMonTypeTrigConfig starts...\n");
3990 
3991  /* check if deviceIndex is out of defined value */
3992  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || (RL_NULL_PTR == data))
3993  {
3994  /* set return error code */
3995  retVal = RL_RET_CODE_INVALID_INPUT;
3996  RL_LOGE_ARG0("rlMonTypeTrigConfig, Invalid device map\n");
3997  }
3998  else
3999  {
4000  /* Package the command with given data and send it to device */
4001  retVal = rlDriverExecuteSetApi(deviceMap, RL_RF_DYNAMIC_CONF_SET_MSG,
4002  RL_RF_MONITOR_TYPE_TRIG_CONF_SB,
4003  (rlUInt8_t*)(data),
4004  (rlUInt16_t)sizeof(rlMonTypeTrigCfg_t));
4005  }
4006 
4007  RL_LOGV_ARG0("rlMonTypeTrigConfig ends...\n");
4008 
4009  return retVal;
4010 }
4011 
4027 /* Sub block ID: 0x008D, ICD API: AWR_APLL_SYNTH_BW_CONTROL_SB */
4028 /* DesignId : MMWL_DesignId_126 */
4029 /* Requirements : AUTORADAR_REQ-1053 */
4030 rlReturnVal_t rlRfApllSynthBwCtlConfig(rlUInt8_t deviceMap, rlRfApllSynthBwControl_t* data)
4031 {
4032  rlReturnVal_t retVal;
4033 
4034  /* check if deviceIndex is out of defined value */
4035  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || \
4036  (RL_NULL_PTR == data))
4037  {
4038  /* set return error code */
4039  retVal = RL_RET_CODE_INVALID_INPUT;
4040  }
4041  else
4042  {
4043  /* Package the command with given data and send it to device */
4044  retVal = rlDriverExecuteSetApi(deviceMap, RL_RF_STATIC_CONF_SET_MSG,
4045  RL_RF_APLL_SYNTH_BW_CTL_SB,
4046  (rlUInt8_t*)data,
4047  (rlUInt16_t)sizeof(rlRfApllSynthBwControl_t));
4048  }
4049  return retVal;
4050 }
4051 
4081 /* Sub block ID: 0x0116, ICD API: AWR_ADVANCE_CHIRP_GENERIC_LUT_LOAD_SB */
4082 /* DesignId : MMWL_DesignId_130 */
4083 /* Requirements : AUTORADAR_REQ-1050 */
4084 rlReturnVal_t rlSetAdvChirpLUTConfig(rlUInt8_t deviceMap, rlAdvChirpLUTCfg_t *data)
4085 {
4086  rlReturnVal_t retVal;
4087 
4088  RL_LOGV_ARG0("rlSetAdvChirpLUTConfig starts...\n");
4089 
4090  /* check if deviceIndex is out of defined value */
4091  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || (RL_NULL_PTR == data))
4092  {
4093  /* set return error code */
4094  retVal = RL_RET_CODE_INVALID_INPUT;
4095  RL_LOGE_ARG0("rlSetAdvChirpLUTConfig, Invalid device map\n");
4096  }
4097  else
4098  {
4099  /* Package the command with given data and send it to device */
4100  retVal = rlDriverExecuteSetApi(deviceMap, RL_RF_DYNAMIC_CONF_SET_MSG,
4101  RL_RF_ADV_CHIRP_CFG_LUT_SET_SB,
4102  (rlUInt8_t*)(data),
4103  (rlUInt16_t)sizeof(rlAdvChirpLUTCfg_t));
4104  }
4105 
4106  RL_LOGV_ARG0("rlSetAdvChirpLUTConfig ends...\n");
4107 
4108  return retVal;
4109 }
4110 
4129 /* Sub block ID: 0x0116, ICD API: AWR_ADVANCE_CHIRP_GENERIC_LUT_LOAD_SB */
4130 /* DesignId : MMWL_DesignId_131 */
4131 /* Requirements : AUTORADAR_REQ-1050 */
4132 /*AR_CODE_REVIEW MR:R.2.2 <APPROVED> "numBytes is re initialized under different conditions" */
4133 /*LDRA_INSPECTED 8 D */
4134 rlReturnVal_t rlSetMultiAdvChirpLUTConfig(rlUInt8_t deviceMap,
4135  rlAdvChirpLUTCfg_t* AdvChirpLUTCfgArgs,
4136  rlInt8_t* AdvChirpLUTData)
4137 {
4138  rlReturnVal_t retVal = RL_RET_CODE_OK;
4139  /* Structure used to send the LUT RAM data to populate the LUT at the device end */
4140  rlAdvChirpLUTCfg_t AdvChirpLUTCfgChunk = { 0 };
4141  /* Variables to keep track of the number of chunks and the chunk size */
4142  rlUInt16_t chunkCount = 0U, totalChunkCount, lastChunkSize;
4143 
4144  RL_LOGV_ARG0("rlSetMultiAdvChirpLUTConfig starts...\n");
4145 
4146  /* check if deviceIndex is out of defined value */
4147  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || \
4148  (RL_NULL_PTR == AdvChirpLUTCfgArgs) || (RL_NULL_PTR == AdvChirpLUTData))
4149  {
4150  /* set return error code */
4151  retVal += RL_RET_CODE_INVALID_INPUT;
4152  RL_LOGE_ARG0("rlSetMultiAdvChirpLUTConfig, Invalid input params\n");
4153  }
4154  else
4155  {
4156  RL_LOGV_ARG2("rlSetMultiAdvChirpLUTConfig with \nlutAddOffset[%d]\nnumBytes[%d] \n\n",\
4157  AdvChirpLUTCfgArgs->lutAddressOffset, AdvChirpLUTCfgArgs->numBytes);
4158 
4159  /* If the LUT size to be programmed is more than 212 bytes, then break them into chunks
4160  of 212 bytes and send them one after the other over SPI */
4161  if (AdvChirpLUTCfgArgs->numBytes > RL_MAX_ADV_CHIRP_LUT_CHUNK_SIZE)
4162  {
4163  /* If the overall LUT size is a multiple of 212 bytes */
4164  if ((AdvChirpLUTCfgArgs->numBytes % RL_MAX_ADV_CHIRP_LUT_CHUNK_SIZE) == 0U)
4165  {
4166  lastChunkSize = RL_MAX_ADV_CHIRP_LUT_CHUNK_SIZE;
4167  totalChunkCount = \
4168  (rlUInt16_t)(AdvChirpLUTCfgArgs->numBytes / RL_MAX_ADV_CHIRP_LUT_CHUNK_SIZE);
4169  }
4170  /* Else, keep track of the remaining bytes in the last chunk */
4171  else
4172  {
4173  totalChunkCount = \
4174  (rlUInt16_t)((AdvChirpLUTCfgArgs->numBytes/RL_MAX_ADV_CHIRP_LUT_CHUNK_SIZE) + 1U);
4175  lastChunkSize = \
4176  (rlUInt16_t)(AdvChirpLUTCfgArgs->numBytes % RL_MAX_ADV_CHIRP_LUT_CHUNK_SIZE);
4177  }
4178  }
4179  /* If the total size of the LUT to be programmed is less than 212 bytes, it can be
4180  sent in a single chunk */
4181  else
4182  {
4183  totalChunkCount = 1U;
4184  /* last chunk size is same as total number of bytes in this case */
4185  lastChunkSize = AdvChirpLUTCfgArgs->numBytes;
4186  }
4187 
4188  while (chunkCount < totalChunkCount)
4189  {
4190  RL_LOGV_ARG1("Sending Advanced Chirp LUT data Chunk [%d]... \n\n", chunkCount);
4191  /* Update the LUT Address offset for every chunk */
4192  AdvChirpLUTCfgChunk.lutAddressOffset = \
4193  (rlUInt16_t)(AdvChirpLUTCfgArgs->lutAddressOffset + \
4194  (chunkCount * RL_MAX_ADV_CHIRP_LUT_CHUNK_SIZE));
4195 
4196  /* If the data belongs to last chunk or if it is a single chunk */
4197  if (chunkCount == (totalChunkCount - 1U))
4198  {
4199  AdvChirpLUTCfgChunk.numBytes = lastChunkSize;
4200  }
4201  /* For other intermediate chunks, send the entire length of 212 bytes */
4202  else
4203  {
4204  AdvChirpLUTCfgChunk.numBytes = RL_MAX_ADV_CHIRP_LUT_CHUNK_SIZE;
4205  }
4206 
4207  if (AdvChirpLUTCfgChunk.numBytes > 0U)
4208  {
4209  /* Copy the input AdvChirpLUTData to LUT structure */
4210  /*AR_CODE_REVIEW MR:R.18.1 <INSPECTED> "Accessing pointer as array"*/
4211  /*LDRA_INSPECTED 436 S */
4212  (void)memcpy(&AdvChirpLUTCfgChunk.calData[0U], \
4213  &AdvChirpLUTData[chunkCount * RL_MAX_ADV_CHIRP_LUT_CHUNK_SIZE], \
4214  AdvChirpLUTCfgChunk.numBytes);
4215 
4216  RL_LOGV_ARG2("rlSetAdvChirpLUTConfig with \nlutAddOffset[%d]\nnumBytes[%d] \n\n",\
4217  AdvChirpLUTCfgChunk.lutAddressOffset, AdvChirpLUTCfgChunk.numBytes);
4218  /* Send the LUT RAM structure (chunk) to the device */
4219  retVal += rlSetAdvChirpLUTConfig(deviceMap, &AdvChirpLUTCfgChunk);
4220 
4221  if (retVal != RL_RET_CODE_OK)
4222  {
4223  RL_LOGV_ARG2("Advanced Chirp LUT data Chunk [%d] failed with error code %d",\
4224  chunkCount, retVal);
4225  break;
4226  }
4227  }
4228  else
4229  {
4230  /* set return error code */
4231  retVal += RL_RET_CODE_INVALID_INPUT;
4232  RL_LOGV_ARG2("Invalid input, Chirp LUT Chunk [%d] is programmed with %d bytes",\
4233  chunkCount, AdvChirpLUTCfgChunk.numBytes);
4234  }
4235 
4236  chunkCount++;
4237  }
4238  }
4239 
4240  RL_LOGV_ARG0("rlSetMultiAdvChirpLUTConfig ends...\n");
4241 
4242  return retVal;
4243 }
4244 
4261 /* Sub block ID: 0x0118, ICD API: AWR_ADVANCE_CHIRP_DYN_LUT_ADDR_OFFSET_CFG_SB */
4262 /* DesignId : MMWL_DesignId_132 */
4263 /* Requirements : AUTORADAR_REQ-1050 */
4264 rlReturnVal_t rlSetAdvChirpDynLUTAddrOffConfig(rlUInt8_t deviceMap, \
4266 {
4267  rlReturnVal_t retVal;
4268 
4269  RL_LOGV_ARG0("rlSetAdvChirpDynLUTAddrOffConfig starts...\n");
4270 
4271  /* check if deviceIndex is out of defined value */
4272  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || (RL_NULL_PTR == data))
4273  {
4274  /* set return error code */
4275  retVal = RL_RET_CODE_INVALID_INPUT;
4276  RL_LOGE_ARG0("rlSetAdvChirpDynLUTAddrOffConfig, Invalid device map\n");
4277  }
4278  else
4279  {
4280  /* Package the command with given data and send it to device */
4281  retVal = rlDriverExecuteSetApi(deviceMap, RL_RF_DYNAMIC_CONF_SET_MSG,
4282  RL_RF_ADV_CHIRP_DYN_LUT_ADD_OFF_CONF_SB,
4283  (rlUInt8_t*)(data),
4284  (rlUInt16_t)sizeof(rlAdvChirpDynLUTAddrOffCfg_t));
4285  }
4286 
4287  RL_LOGV_ARG0("rlSetAdvChirpDynLUTAddrOffConfig ends...\n");
4288 
4289  return retVal;
4290 }
4291 
4310 /* DesignId : MMWL_DesignId_127 */
4311 /* Requirements : AUTORADAR_REQ-1072 */
4312 rlReturnVal_t rlSetPowerSaveModeConfig(rlUInt8_t deviceMap, rlPowerSaveModeCfg_t* data)
4313 {
4314  rlReturnVal_t retVal;
4315 
4316  RL_LOGV_ARG0("rlSetPowerSaveModeConfig starts...\n");
4317 
4318  /* check if deviceIndex is out of defined value */
4319  if ((rlDriverIsDeviceMapValid(deviceMap) != RL_RET_CODE_OK) || \
4320  (RL_NULL_PTR == data))
4321  {
4322  /* set return error code */
4323  retVal = RL_RET_CODE_INVALID_INPUT;
4324  RL_LOGE_ARG0("rlSetPowerSaveModeConfig, Invalid device map\n");
4325  }
4326  else
4327  {
4328  /* Package the command with given data and send it to device */
4329  retVal = rlDriverExecuteSetApi(deviceMap, RL_RF_ADVANCED_FEATURES_SET_MSG,
4330  RL_RF_POWER_SAVE_MODE_CONF_SB, (rlUInt8_t*)data,
4331  (rlUInt16_t)sizeof(rlPowerSaveModeCfg_t));
4332  }
4333 
4334  RL_LOGV_ARG0("rlSetPowerSaveModeConfig ends...\n");
4335 
4336  return retVal;
4337 }
4338 
4339 /*
4340  * END OF rl_sensor.c FILE
4341  */
Radar RF LDO bypass enable/disable configuration.
Definition: rl_sensor.h:2139
ADC format and payload justification Configuration.
Definition: rl_sensor.h:367
rlReturnVal_t rlSetInterChirpBlkCtrl(rlUInt8_t deviceMap, rlInterChirpBlkCtrlCfg_t *data)
Sets Inter-chip turn on and turn off times or various RF blocks.
Definition: rl_sensor.c:3480
rlReturnVal_t rlGetRfBootupStatus(rlUInt8_t deviceMap, rlRfBootStatusCfg_t *data)
Get radarSS bootup status.
Definition: rl_sensor.c:3440
Test source Enable API parameters RL_RF_TEST_SOURCE_ENABLE_SB.
Definition: rl_sensor.h:1763
Radar RF Calibration monitoring time unit configuration.
Definition: rl_sensor.h:2657
rlReturnVal_t rlSetTestSourceConfig(rlUInt8_t deviceMap, rlTestSource_t *data)
Configures the Test Source.
Definition: rl_sensor.c:1673
Advanced chirp configuration structure.
Definition: rl_sensor.h:4833
Advance Frame Sequence config API parameters rlAdvFrameCfg, 148 bytes.
Definition: rl_sensor.h:1414
rlReturnVal_t rlSetProfileConfig(rlUInt8_t deviceMap, rlUInt16_t cnt, rlProfileCfg_t *data)
Sets Chirp profile Configuration.
Definition: rl_sensor.c:441
rlReturnVal_t rlFrameStartStop(rlUInt8_t deviceMap, rlFrameTrigger_t *data)
Triggers/Stops Transmission of Frames.
Definition: rl_sensor.c:1563
Die ID data structure.
Definition: rl_sensor.h:4794
rlReturnVal_t rlRfInterRxGainPhaseConfig(rlUInt8_t deviceMap, rlInterRxGainPhConf_t *data)
Sets different Rx gain/phase offset.
Definition: rl_sensor.c:3406
rlReturnVal_t rlTxGainTempLutSet(rlUInt8_t deviceMap, rlTxGainTempLutData_t *data)
Overwrites TX gain temperature based Lookup table (LUT)
Definition: rl_sensor.c:2731
API radarSS GPADC API MEAS SET SBC M_API_AR_RF_GPADC_API_SET_SB.
Definition: rl_sensor.h:2073
Dynamic chirp enable configuration.
Definition: rl_sensor.h:4090
rlReturnVal_t rlRfGetTemperatureReport(rlUInt8_t deviceMap, rlRfTempData_t *data)
Gets Time and Temperature information report.
Definition: rl_sensor.c:1753
rlReturnVal_t rlGetRfDieId(rlUInt8_t deviceMap, rlRfDieIdCfg_t *data)
Get device die ID status.
Definition: rl_sensor.c:3735
Structure to hold the BSS ESM Fault data strucutre for event RL_RF_AE_ESMFAULT_SB.
Definition: mmwavelink.h:2097
rlReturnVal_t rlSetAdvChirpDynLUTAddrOffConfig(rlUInt8_t deviceMap, rlAdvChirpDynLUTAddrOffCfg_t *data)
Configure LUT address offset dynamically for each chirp parameters defined in rlSetAdvChirpConfig API...
Definition: rl_sensor.c:4264
Structure to store all Phase shifter calibration data chunks which device provides in response of rlR...
Definition: rl_sensor.h:4786
Radar RF Phase shift loopback configuration.
Definition: rl_sensor.h:2319
rlReturnVal_t rlRfGetCpuFault(rlUInt8_t deviceMap, rlCpuFault_t *data)
Get RadarSS CPU fault status.
Definition: rl_sensor.c:3768
rlReturnVal_t rlRfSetMiscConfig(rlUInt8_t deviceMap, rlRfMiscConf_t *data)
Sets misc feature such as per chirp phase shifter.
Definition: rl_sensor.c:2387
rlReturnVal_t rlTestSourceEnable(rlUInt8_t deviceMap, rlTestSourceEnable_t *data)
Enables the Test Source.
Definition: rl_sensor.c:1713
rlUInt16_t numBytes
Number of valid bytes to write. Valid range: 4 to 212, must be multiple of 4. .
Definition: rl_sensor.h:5269
rlReturnVal_t rlRfRunTimeCalibConfig(rlUInt8_t deviceMap, rlRunTimeCalibConf_t *data)
Set RF one time & periodic calibration of various RF/analog aspects and trigger.
Definition: rl_sensor.c:2592
void rlDriverConstructOutMsg(rlUInt16_t numSblk, rlDriverMsg_t *outMsg, rlPayloadSb_t *payloadPtr)
: Construct command packet based on given message-ID and payload
Definition: rl_driver.c:3068
RX gain temperature LUT inject.
Definition: rl_sensor.h:3268
Test source config API parameters E_API_AR_TEST_SOURCE_CONF_SB.
Definition: rl_sensor.h:1709
rlReturnVal_t rlSetLowPowerModeConfig(rlUInt8_t deviceMap, rlLowPowerModeCfg_t *data)
Sets Low Power Mode Configuration.
Definition: rl_sensor.c:1404
Tx freq and power limit configuration.
Definition: rl_sensor.h:3471
rlReturnVal_t rlGetProfileConfig(rlUInt8_t deviceMap, rlUInt16_t profileId, rlProfileCfg_t *data)
Gets Chirp profile Configuration.
Definition: rl_sensor.c:528
rlReturnVal_t rlRfInit(rlUInt8_t deviceMap)
Initializes the RF/Analog Subsystem.
Definition: rl_sensor.c:1625
rlUInt8_t rlDriverGetPlatformId(void)
Returns RL Platform ID (i.e. where mmWaveLink is executing)
Definition: rl_driver.c:2357
Get phase shift calibration data configuration structure.
Definition: rl_sensor.h:4669
Chirp config API parameters. This structure contains fine dithering to coarse profile defined in rlPr...
Definition: rl_sensor.h:902
rlReturnVal_t rlRfGetEsmFault(rlUInt8_t deviceMap, rlBssEsmFault_t *data)
Get RadarSS ESM fault status.
Definition: rl_sensor.c:3807
Frame config API parameters.
Definition: rl_sensor.h:980
rlReturnVal_t rlRfSetCalMonFreqLimitConfig(rlUInt8_t deviceMap, rlRfCalMonFreqLimitConf_t *data)
Set Calibration monitoring Frequency Limit.
Definition: rl_sensor.c:2492
rlReturnVal_t rlMonTypeTrigConfig(rlUInt8_t deviceMap, rlMonTypeTrigCfg_t *data)
Maintains monitoring timing synchronization in cascaded devices to avoid mutual interference of monit...
Definition: rl_sensor.c:3985
rlReturnVal_t rlSetAdcOutConfig(rlUInt8_t deviceMap, rlAdcOutCfg_t *data)
Sets ADC Output Configuration.
Definition: rl_sensor.c:153
Radar RF Init Calibration configuration.
Definition: rl_sensor.h:2830
rlReturnVal_t rlRfDynamicPowerSave(rlUInt8_t deviceMap, rlDynPwrSave_t *data)
: Configure dynamic power saving feature.
Definition: rl_sensor.c:1844
rlReturnVal_t rlRfSetCalMonTimeUnitConfig(rlUInt8_t deviceMap, rlRfCalMonTimeUntConf_t *data)
Set Calibration monitoring time unit.
Definition: rl_sensor.c:2439
Phase shift calibration data which application will receive from radarSS and will feed in to the Devi...
Definition: rl_sensor.h:4706
Low Power mode configuration.
Definition: rl_sensor.h:532
rlReturnVal_t rlRfTxFreqPwrLimitConfig(rlUInt8_t deviceMap, rlRfTxFreqPwrLimitMonConf_t *data)
Sets the limits for RF frequency transmission for each TX and also TX power limits.
Definition: rl_sensor.c:2845
Sub-frame trigger API.
Definition: rl_sensor.h:4652
rlReturnVal_t rlRfPhShiftCalibDataRestore(rlUInt8_t deviceMap, rlPhShiftCalibrationData_t *data)
Injects phase shifter calibration data to the device.
Definition: rl_sensor.c:3574
Dynamic power saving API parameters.
Definition: rl_sensor.h:1869
rlReturnVal_t rlGetFrameConfig(rlUInt8_t deviceMap, rlFrameCfg_t *data)
Gets Frame Configuration.
Definition: rl_sensor.c:1084
void rlDriverConstructInMsg(rlUInt16_t msgId, rlDriverMsg_t *inMsg, rlPayloadSb_t *payloadPtr)
: Construct command packet (inMsg) based on given message-ID and payload
Definition: rl_driver.c:3033
rlInt8_t calData[RL_MAX_ADV_CHIRP_LUT_CHUNK_SIZE]
Byte array to load in to the Generic SW Chirp Parameter LUT. The size of this sub-block is fixed to...
Definition: rl_sensor.h:5275
rlUInt8_t calibApply
Set this to 1 after injecting calibration data for all Txs to enable the firmware calibration....
Definition: rl_sensor.h:4720
API RF device Config SBC M_API_AR_RF_DEV_CONF_SBC.
Definition: rl_sensor.h:1895
rlReturnVal_t rlRfSetPSLoopbackConfig(rlUInt8_t deviceMap, rlRfPSLoopbackCfg_t *data)
Enable/Disable Phase shift loopback for all enabled profiles.
Definition: rl_sensor.c:2210
Radar RF Phase Shift enable/disable configuration.
Definition: rl_sensor.h:2206
rlReturnVal_t rlRfSetPhaseShiftConfig(rlUInt8_t deviceMap, rlUInt16_t cnt, rlRfPhaseShiftCfg_t *data)
Enable/Disable phase shift configurations per chirp in each of the TXs.
Definition: rl_sensor.c:2036
rlReturnVal_t rlSensorStop(rlUInt8_t deviceMap)
Stops Transmission of Frames.
Definition: rl_sensor.c:1503
rlUInt16_t nsbc
Number of Sub Blocks in Payload.
Definition: rl_driver.h:349
Radar RF Calibration monitoring Frequency Limit configuration.
Definition: rl_sensor.h:2789
RF characterization Time and Temperature data structure.
Definition: rl_sensor.h:1778
rlReturnVal_t rlSetPowerSaveModeConfig(rlUInt8_t deviceMap, rlPowerSaveModeCfg_t *data)
Sets the power save mode Configuration.
Definition: rl_sensor.c:4312
Frame config API parameters.
Definition: rl_sensor.h:1292
TX gain temperature LUT read.
Definition: rl_sensor.h:3238
Array of coefficients for the RF programmable filter.
Definition: rl_sensor.h:2482
rlReturnVal_t rlSetAdvFrameConfig(rlUInt8_t deviceMap, rlAdvFrameCfg_t *data)
Sets Advance Frame Configuration.
Definition: rl_sensor.c:1196
rlReturnVal_t rlDriverExecuteGetApi(rlUInt8_t deviceMap, rlUInt16_t msgId, rlUInt16_t sbcID, rlUInt8_t *msgData, rlUInt16_t inLen)
: Construct get message and invoke command.
Definition: rl_driver.c:3132
Get calibration data configuration structure.
Definition: rl_sensor.h:4179
Advanced Chirp Dynamic LUT Address Offset Configuration Structure Configure LUT address offset dynami...
Definition: rl_sensor.h:5282
Radar RF IF loopback configuration.
Definition: rl_sensor.h:2435
rlReturnVal_t rlRfPhShiftCalibDataStore(rlUInt8_t deviceMap, rlPhShiftCalibrationData_t *data)
Read calibration data from the device.
Definition: rl_sensor.c:3660
rlReturnVal_t rlSetFrameConfig(rlUInt8_t deviceMap, rlFrameCfg_t *data)
Sets Frame Configuration.
Definition: rl_sensor.c:1023
Power saving mode configuration.
Definition: rl_sensor.h:548
MMWL_EXPORT rlReturnVal_t rlDeviceAdvFrameConfigApply(rlUInt8_t deviceMap, rlAdvFrameDataCfg_t *data)
Sets Advance Frame data path Configuration.
Definition: rl_device.c:2118
Dynamic chirp configuration for 16 chirp configurations.
Definition: rl_sensor.h:4017
rlReturnVal_t rlRfCalibDataStore(rlUInt8_t deviceMap, rlCalibrationData_t *data)
Read calibration data from the device.
Definition: rl_sensor.c:3324
rlReturnVal_t rlEnableContMode(rlUInt8_t deviceMap, rlContModeEn_t *data)
Enable/Disable Continous mode.
Definition: rl_sensor.c:1357
rlReturnVal_t rlRxGainTempLutSet(rlUInt8_t deviceMap, rlRxGainTempLutData_t *data)
Overwrite RX gain temperature Lookup Table(LUT) in Radar SS.
Definition: rl_sensor.c:2633
rlReturnVal_t rlSetContModeConfig(rlUInt8_t deviceMap, rlContModeCfg_t *data)
Sets Continous mode Configuration.
Definition: rl_sensor.c:1317
rlUInt16_t lutAddressOffset
Start address offset at which to populate the bytes of patterns. Address offset has to be multiple ...
Definition: rl_sensor.h:5264
rlReturnVal_t rlRfCalibDataRestore(rlUInt8_t deviceMap, rlCalibrationData_t *data)
Injects calibration data to the device.
Definition: rl_sensor.c:3242
MMWL_EXPORT rlReturnVal_t rlDeviceFrameConfigApply(rlUInt8_t deviceMap, rlFrameApplyCfg_t *data)
Sets Frame data path Configuration.
Definition: rl_device.c:2168
Calibration data which application will receive from radarSS and will feed in to the Device in next p...
Definition: rl_sensor.h:4195
APLL Synthesizer Bandwidth Control.
Definition: rl_sensor.h:5171
RHCP Payload Structure.
Definition: rl_driver.h:161
rlReturnVal_t rlDriverCmdInvoke(rlUInt8_t deviceMap, rlDriverMsg_t inMsg, rlDriverMsg_t *outMsg)
Invokes a command to mmwave radar Device. Implements mmwave radar Host Communication Protocol(RHCP)
Definition: rl_driver.c:2739
rlReturnVal_t rlSetMultiBpmChirpConfig(rlUInt8_t deviceMap, rlUInt16_t cnt, rlBpmChirpCfg_t **data)
Sets Binary Phase Modulation configuration for multiple Chirp.
Definition: rl_sensor.c:285
rlReturnVal_t rlRfSetDeviceCfg(rlUInt8_t deviceMap, rlRfDevCfg_t *data)
: Set different RadarSS device configurations
Definition: rl_sensor.c:1894
Binary phase modulation common configuration.
Definition: rl_sensor.h:500
The DFE Statistics Report Contents.
Definition: rl_sensor.h:1858
rlUInt8_t txIndex
Index of the transmitter channel for which the phase shift is desired Valid range: 0 to (Number of ...
Definition: rl_sensor.h:4715
Dynamic per chirp phase shifter configuration.
Definition: rl_sensor.h:4135
mmwave radar Driver Payload
Definition: rl_driver.h:355
TX gain temperature LUT inject.
Definition: rl_sensor.h:3383
rlUInt16_t startStop
Start/Stop Frame 0x0000 - Stop the transmission of frames after the current frame 0x0001 - Trigge...
Definition: rl_sensor.h:1611
rlReturnVal_t rlSetChannelConfig(rlUInt8_t deviceMap, rlChanCfg_t *data)
Sets the Rx and Tx Channel Configuration.
Definition: rl_sensor.c:107
Rx/Tx Channel Configuration.
Definition: rl_sensor.h:220
rlReturnVal_t rlSetBpmChirpConfig(rlUInt8_t deviceMap, rlBpmChirpCfg_t *data)
Sets Binary Phase Modulation Chirp Configuration.
Definition: rl_sensor.c:241
Radar RF PA loopback configuration.
Definition: rl_sensor.h:2280
rlReturnVal_t rlSetSubFrameStart(rlUInt8_t deviceMap, rlSubFrameStartCfg_t *data)
Triggers the next sub-frame in software triggered sub-frame mode.
Definition: rl_sensor.c:3532
rlReturnVal_t rlSetGpAdcConfig(rlUInt8_t deviceMap, rlGpAdcCfg_t *data)
: Configure GP ADC data parameters
Definition: rl_sensor.c:1940
void rlDriverFillPayload(rlUInt16_t msgId, rlUInt16_t sbcID, rlPayloadSb_t *payloadPtr, rlUInt8_t *data, rlUInt16_t inLen)
: Fill payload based on given message-ID, sub-block ID and data.
Definition: rl_driver.c:3099
Binary phase modulation common configuration.
Definition: rl_sensor.h:469
Radar RF Miscconfiguration.
Definition: rl_sensor.h:2605
rlUInt16_t reserved
Reserved for Future use.
Definition: rl_sensor.h:1615
Inter Chirp block control configuration.
Definition: rl_sensor.h:4537
Structure to store all Calibration data chunks which device provides in response of rlRfCalibDataStor...
Definition: rl_sensor.h:4303
rlReturnVal_t rlSetDynPerChirpPhShifterCfg(rlUInt8_t deviceMap, rlUInt16_t segCnt, rlDynPerChirpPhShftCfg_t **data)
Injects per-chirp phase shifter configuration to be applied dynamically.
Definition: rl_sensor.c:3114
rlAdvFrameDataCfg_t frameData
Advance Frame data configuration. Applicable with AWR1243/AWR2243/xWR6243 devices.
Definition: rl_sensor.h:1423
rlReturnVal_t rlSetBpmCommonConfig(rlUInt8_t deviceMap, rlBpmCommonCfg_t *data)
Sets Binary Phase Modulation Common Configuration.
Definition: rl_sensor.c:199
rlUInt16_t reserved
Reserved for Future use.
Definition: rl_sensor.h:1309
rlReturnVal_t rlSetDynChirpCfg(rlUInt8_t deviceMap, rlUInt16_t segCnt, rlDynChirpCfg_t **data)
Injects chirp configuration to be programmed dynamically.
Definition: rl_sensor.c:2941
Radar RF Run time calibration configuration.
Definition: rl_sensor.h:2891
Advance Frame Sequence config API parameters rlAdvFrameCfg, 148 bytes.
Definition: rl_sensor.h:1172
Continous Mode Enable API parameters.
Definition: rl_sensor.h:1579
Radar RF programmable filter configuration.
Definition: rl_sensor.h:2533
Advanced Chirp LUT Configuration Structure Load a generic chirp parameter LUT (firmware RAM of size 1...
Definition: rl_sensor.h:5246
Monitor Type Trigger configuration structure.
Definition: rl_sensor.h:5131
rlReturnVal_t rlRfSetPALoopbackConfig(rlUInt8_t deviceMap, rlRfPALoopbackCfg_t *data)
Enable/Disable PA loopback for all enabled profiles.
Definition: rl_sensor.c:2160
Structure to hold the MSS/radarSS CPU Fault data strucutre for event RL_DEV_AE_MSS_CPUFAULT_SB and RL...
Definition: mmwavelink.h:2367
Profile config API parameters. A profile contains coarse parameters of FMCW chirp such as start frequ...
Definition: rl_sensor.h:580
Chirp start, end Index parameters for rlGetChirpConfig.
Definition: rl_sensor.h:971
rlReturnVal_t rlRfSetProgFiltCoeffRam(rlUInt8_t deviceMap, rlRfProgFiltCoeff_t *data)
Set Programmable Filter coefficient RAM.
Definition: rl_sensor.c:2302
rlUInt32_t numChirps
Number of Chirps per Frame.
Definition: rl_sensor.h:1297
rlReturnVal_t rlGetAdvFrameConfig(rlUInt8_t deviceMap, rlAdvFrameCfg_t *data)
Gets Advance Frame Configuration.
Definition: rl_sensor.c:1244
Continous Mode config API parameters.
Definition: rl_sensor.h:1429
Loopback burst set configuration.
Definition: rl_sensor.h:3616
RX gain temperature LUT read.
Definition: rl_sensor.h:3208
rlReturnVal_t rlSetMultiAdvChirpLUTConfig(rlUInt8_t deviceMap, rlAdvChirpLUTCfg_t *AdvChirpLUTCfgArgs, rlInt8_t *AdvChirpLUTData)
Multi Advanced chirp LUT configuration API.
Definition: rl_sensor.c:4134
BSS Bootup status data structure.
Definition: rl_sensor.h:4484
rlReturnVal_t rlSetAdvChirpLUTConfig(rlUInt8_t deviceMap, rlAdvChirpLUTCfg_t *data)
Set the Advanced chirp LUT configuration to the device.
Definition: rl_sensor.c:4084
rlReturnVal_t rlSensorStart(rlUInt8_t deviceMap)
Triggers Transmission of Frames.
Definition: rl_sensor.c:1449
rlReturnVal_t rlSetDynChirpEn(rlUInt8_t deviceMap, rlDynChirpEnCfg_t *data)
Triggers copy of chirp config from SW to HW RAM.
Definition: rl_sensor.c:3065
rlReturnVal_t rlRfSetProgFiltConfig(rlUInt8_t deviceMap, rlRfProgFiltConf_t *data)
Set Programmable Filter configuration.
Definition: rl_sensor.c:2344
rlReturnVal_t rlRfSetIFLoopbackConfig(rlUInt8_t deviceMap, rlRfIFLoopbackCfg_t *data)
Enable/Disable RF IF loopback for all enabled profiles. This is used for debug to check if both TX an...
Definition: rl_sensor.c:2253
rlReturnVal_t rlSetMultiChirpCfg(rlUInt8_t deviceMap, rlUInt16_t cnt, rlChirpCfg_t **data)
Injects chirp configuration to be programmed dynamically.
Definition: rl_sensor.c:866
rlReturnVal_t rlSetAdvChirpConfig(rlUInt8_t deviceMap, rlAdvChirpCfg_t *data)
Set the Advanced chirp configuration to the device.
Definition: rl_sensor.c:3914
Frame Trigger API parameters RL_RF_FRAMESTARTSTOP_CONF_SB.
Definition: rl_sensor.h:1596
rlReturnVal_t rlRfInitCalibConfig(rlUInt8_t deviceMap, rlRfInitCalConf_t *data)
Set RF Init Calibration Mask bits and report type.
Definition: rl_sensor.c:2540
rlUInt16_t numAdcSamples
Number of half words in ADC buffer per chirp Example 1: In real mode, if number of ADC samples per ...
Definition: rl_sensor.h:1305
rlReturnVal_t rlSetLoopBckBurstCfg(rlUInt8_t deviceMap, rlLoopbackBurst_t *data)
This API is used to introduce loopback chirps within the functional frames.
Definition: rl_sensor.c:2901
Inter-Rx gain and phase offset configuration.
Definition: rl_sensor.h:4311
rlReturnVal_t rlRfDfeRxStatisticsReport(rlUInt8_t deviceMap, rlDfeStatReport_t *data)
Gets Digital Front end statistics such as Residual DC, RMS power in I and Q chains for different Rece...
Definition: rl_sensor.c:1795
rlReturnVal_t rlRfApllSynthBwCtlConfig(rlUInt8_t deviceMap, rlRfApllSynthBwControl_t *data)
Control bandwidth of the APLL and Synthesizer.
Definition: rl_sensor.c:4030
rlReturnVal_t rlGetChirpConfig(rlUInt8_t deviceMap, rlUInt16_t chirpStartIdx, rlUInt16_t chirpEndIdx, rlChirpCfg_t *data)
Gets Chirp Configuration.
Definition: rl_sensor.c:728
rlUInt8_t txIndex
Index of the transmitter channel for which the phase shift is desired Valid range: 0 to (Number of ...
Definition: rl_sensor.h:4678
rlReturnVal_t rlDriverExecuteSetApi(rlUInt8_t deviceMap, rlUInt16_t msgId, rlUInt16_t sbcID, rlUInt8_t *msgData, rlUInt16_t inLen)
: Construct set message and invoke command.
Definition: rl_driver.c:3188
rlReturnVal_t rlSetChirpConfig(rlUInt8_t deviceMap, rlUInt16_t cnt, rlChirpCfg_t *data)
Sets Chirp Configuration.
Definition: rl_sensor.c:603
rlReturnVal_t rlDriverIsDeviceMapValid(rlUInt8_t deviceMap)
Checks if given deviecMap is valid wrt to global DeviceMap set to mmWaveLink.
Definition: rl_driver.c:2394
rlAdvFrameSeqCfg_t frameSeq
Advance Frame sequence and Subframe configuration.
Definition: rl_sensor.h:1419

Copyright 2021, Texas Instruments Incorporated