[FAQ] AWRL6844EVM: AWRL6844EVM: Common Hardware questions

Part Number: AWRL6844EVM
Other Parts Discussed in Thread: AWRL6844

Tool/software:

FAQ #1 - AWRL6844 device gets a reset from PMIC at regular intervals.

In some of the AWRL6844 EVM's shipped, PMIC's WD is enabled. This Watchdog needs to be serviced or disabled within the long window period. The following below are some workarounds which can be used to overcome the reset.

  1. Remove the resistor R87 which connects the nRESETOUT of TPS650365 PMIC to AWRL6844 device.
  2. Disable watchdog within the long window period through software. Following below is the software sequence/example to disable the Watchdog.
    1. Include common_test.h and common_test.c as part of your project. To include these files in mmwave demo, copy these files in same folder location as mmwave_demo.c and include them in project.js as given in below picture.

    2. common_test.h
      common_test.c
      /**
       * @file common_test.c
       *
       * @brief Source file containing definitions of APIs used in all tests.
       */
      #include "common_test.h"
      
      void unityCharPut(uint8_t c)
      {
          DebugP_log("%c", c);
          if (c == '\n')
          {
              DebugP_log("\r");
          }
      }
      
      void app_critSecStart(void)
      {
          /* Empty - No RTOS */
      }
      
      void app_critSecStop(void)
      {
          /* Empty - No RTOS */
      }
      
      int32_t app_ioWrite(const Pmic_CoreHandle_t *pmicHandle, uint8_t regAddr, uint8_t bufLen, const uint8_t *txBuf)
      {
          I2C_Handle i2cHandle;
          I2C_Transaction i2cTransaction;
          int32_t status = PMIC_ST_SUCCESS;
          uint8_t writeBuf[3U] = {0U};
      
          // Parameter check
          if ((pmicHandle == NULL) || (txBuf == NULL))
          {
              status = PMIC_ST_ERR_NULL_PARAM;
          }
          if ((status == PMIC_ST_SUCCESS) && ((bufLen == 0U) || (bufLen > 2U)))
          {
              status = PMIC_ST_ERR_INV_PARAM;
          }
      
          if (status == PMIC_ST_SUCCESS)
          {
              // writeBuf[0U]: Target device internal register address
              // writeBuf[1U] and onwards: txBuf
              writeBuf[0U] = regAddr;
              memcpy(&(writeBuf[1U]), txBuf, bufLen);
      
              // Initialize I2C handle and I2C transaction struct
              i2cHandle = *((I2C_Handle *)pmicHandle->commHandle);
              I2C_Transaction_init(&i2cTransaction);
      
              /*** Configure I2C transaction for a write ***/
              i2cTransaction.targetAddress = pmicHandle->i2cAddr;
              i2cTransaction.writeBuf = writeBuf;
              i2cTransaction.writeCount = bufLen + 1U;
              i2cTransaction.readBuf = NULL;
              i2cTransaction.readCount = 0U;
      
              // Initiate write
              status = I2C_transfer(i2cHandle, &i2cTransaction);
      
              // Convert platform-specific success/error code to driver success/error code
              if (status != I2C_STS_SUCCESS)
              {
                  status = PMIC_ST_ERR_I2C_COMM_FAIL;
              }
              else
              {
                  status = PMIC_ST_SUCCESS;
              }
          }
      
          return status;
      }
      
      int32_t app_ioRead(const Pmic_CoreHandle_t *pmicHandle, uint8_t regAddr, uint8_t bufLen, uint8_t *rxBuf)
      {
          I2C_Handle i2cHandle;
          I2C_Transaction i2cTransaction;
          int32_t status = PMIC_ST_SUCCESS;
      
          // Parameter check
          if ((pmicHandle == NULL) || (rxBuf == NULL))
          {
              status = PMIC_ST_ERR_NULL_PARAM;
          }
          if ((status == PMIC_ST_SUCCESS) && (bufLen == 0U))
          {
              status = PMIC_ST_ERR_INV_PARAM;
          }
      
          if (status == PMIC_ST_SUCCESS)
          {
              // Initialize I2C handle and I2C transaction struct
              i2cHandle = *((I2C_Handle *)pmicHandle->commHandle);
              I2C_Transaction_init(&i2cTransaction);
      
              /*** Configure I2C transaction for a read ***/
              i2cTransaction.targetAddress = pmicHandle->i2cAddr;
              i2cTransaction.writeBuf = &regAddr;
              i2cTransaction.writeCount = 1U;
              i2cTransaction.readBuf = rxBuf;
              i2cTransaction.readCount = bufLen;
      
              // Initiate read
              status = I2C_transfer(i2cHandle, &i2cTransaction);
      
              // Convert platform-specific success/error code to driver success/error code
              if (status != I2C_STS_SUCCESS)
              {
                  status = PMIC_ST_ERR_I2C_COMM_FAIL;
              }
              else
              {
                  status = PMIC_ST_SUCCESS;
              }
          }
      
          return status;
      }
      
    3. rebuild makefile by doing gmake gen-buildfiles.
    4. Include Common_test.h in mmwave_demo.h file.

    5. Do the following code changes to common_test.c 
      • Declare global structure:
        • Pmic_CoreHandle_t pmicHandle;  
      • Define pmicCfg data structure in the main function before driver initialization
        • Pmic_CoreCfg_t pmicCfg = {
                  .i2cAddr = PMIC_CONFIG0_I2C_ADDRESS,
                  .commHandle = &(gI2cHandle[CONFIG_I2C0]),
                  .ioRead = &app_ioRead,
                  .ioWrite = &app_ioWrite,
                  .critSecStart = &app_critSecStart,
                  .critSecStop = &app_critSecStop
              };
              int32_t status = PMIC_ST_SUCCESS;

      • Initialize pmic handle and write to Watchdog mode register.
        • status = Pmic_init(&pmicCfg, &pmicHandle);



              if (status == PMIC_ST_SUCCESS)
              {
                  uint8_t txbuf[1];
                  txbuf[0]= 0x02;
                  status = app_ioWrite(&pmicHandle,0x0F,0x01,txbuf);
              }
              else
              {
                  DebugP_log("Failed to initialize PMIC handle\r\n");
                  DebugP_log("\tStatus code: %d\r\n", status);
              }

              if (status == PMIC_ST_SUCCESS)
              {
                  DebugP_log("\nAll Tests Passed!\r\n\n");
              }
             
              (void)Pmic_deinit(&pmicHandle);

Note: The application should execute the PMIC writes to disable Watch dog at every EVM's power cycle.