Hi,
I want to validate the fault injection about txPsDacFault. The way is that firstly to inject txPsDacFault fault use function rlRfAnaFaultInjConfig, and then detect the async event in mmwave eventFxn callback function MmwDemo_eventCallbackFxn.
The SDK description about txPsDacFault is below:
/** * @brief Primary Fault: TX PS DAC fault injection. This field indicates which TX PS DAC \n should have fault injected. If the fault is enabled, the corresponding TX’s ANA \n DAC LDO would be turned off causing the PS DAC to fail. This fault can be seen \n in TXn_INTERNAL_ANALOG_SIGNALS \n Monitor. This fault injection is only applicable in AWR294x devices. \n Bit Channel \n 0 TX0 \n 1 TX1 \n 2 TX2 \n 3 TX3 \n Others RESERVED \n For each bit, 1 = inject fault, 0 = remove injected fault */ rlUInt8_t txPsDacFault;
:
static void BssFaultInject_SetConfig_txPsDacFault(void) { rlReturnVal_t ret = 0; rlTxnIntAnaSignalsMonConf_t config1 = { .profileIndx = 0, .reportMode = 1, .txPhShiftDacMonThresh = 0, //Not applicable for AWR294x .txSelMask = 0x0F, }; ret = rlRfTxnIntAnaSignalsMonConfig(RL_DEVICE_MAP_INTERNAL_BSS, &config1); if (ret != 0) { test_print("return:%d\n", ret); DebugP_assert(0); } }
/** * @brief The TX phase shifter DAC monitor delta threshold when TX_PS_DAC_MON is Enabled \n (Not applicable for AWR294x) \n 1 LSB = 1.8V/1024 \n Value 0: TX_PS_DAC_MON is disabled \n Valid Range: 1 to 1023 \n */ rlUInt16_t txPhShiftDacMonThresh;
static void BssFaultInject_SetConfig_txPsDacFault(void) { rlReturnVal_t ret = 0; rlMonTxPhShifterDacConf_t config = { .profileId = 0, .reportMode = 1, .txSelMask = 0x0F, .txPsDacMonThresh = {1023, 1023, 1023, 1023}, //1 LSB = 1.8V/1024 }; ret = rlRfMontxPhShiftDacConfig(RL_DEVICE_MAP_INTERNAL_BSS, &config); if (ret != 0) { test_print("return:%d\n", ret); DebugP_assert(0); } }
case RL_RF_AE_MON_ADV_TX_PHSHIFTER_DAC_REPORT: { BssFaultInject_ClearStatus(BssFaultInject_txPsDacFault_TX0); BssFaultInject_ClearStatus(BssFaultInject_txPsDacFault_TX1); BssFaultInject_ClearStatus(BssFaultInject_txPsDacFault_TX2); BssFaultInject_ClearStatus(BssFaultInject_txPsDacFault_TX3); test_print ("RL_RF_AE_MON_ADV_TX_PHSHIFTER_DAC_REPORT Occur\n", asyncSB); memcpy(&reportInfo, payload, sizeof(rlMonTxPhShifterDacRep_t)); test_print ("statusFlags:0x%02x\n", reportInfo.MonTxPhShifterDacRep.statusFlags); test_print ("errorCode:%d\n", reportInfo.MonTxPhShifterDacRep.errorCode); test_print ("timeStamp:%d\n", reportInfo.MonTxPhShifterDacRep.timeStamp); test_print ("psDacIDeltaMinTx0:%d\n", reportInfo.MonTxPhShifterDacRep.psDacIDeltaMinTx0); test_print ("psDacIDeltaMinTx1:%d\n", reportInfo.MonTxPhShifterDacRep.psDacIDeltaMinTx1); test_print ("psDacIDeltaMinTx2:%d\n", reportInfo.MonTxPhShifterDacRep.psDacIDeltaMinTx2); test_print ("psDacIDeltaMinTx3:%d\n", reportInfo.MonTxPhShifterDacRep.psDacIDeltaMinTx3); test_print ("psDacQDeltaMinTx0:%d\n", reportInfo.MonTxPhShifterDacRep.psDacQDeltaMinTx0); test_print ("psDacQDeltaMinTx1:%d\n", reportInfo.MonTxPhShifterDacRep.psDacQDeltaMinTx1); test_print ("psDacQDeltaMinTx2:%d\n", reportInfo.MonTxPhShifterDacRep.psDacQDeltaMinTx2); test_print ("psDacQDeltaMinTx3:%d\n", reportInfo.MonTxPhShifterDacRep.psDacQDeltaMinTx3); test_print ("\n\n"); break; }
