This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA2P-ACD: Gpio Output, SPI and UART initialization for TDA2Px

Part Number: TDA2P-ACD
Other Parts Discussed in Thread: AWR1243, TCA9539

Hello,

I am testing the interfacing of AWR1243 radar sensor with the TDA2Px EVM with Fusion Board through  FPD-Link connection. In the "ProcessorSDKRadar_Development Guide", it talks about Gpio Output initialization (Bsp_Ar12xxGpioOutputParams), McSPI initialization for control of the AWR1243 Sensor (Utils_mcspInit) and UART initialization for firmware download.

However, if you look into the 'chains_common_ar12xx.c' file, in the function 'ChainsCommon_ar12xxInit', I believe that for the TDA2px baord, the board ID is BSP_BOARD_VISION and if you see the else if condition with board ID as BSP_BOARD_VISION, I could not find any Bsp_Ar12xxGpioOutputParams defined in it and neither McSPI initiization and UART initialization. Whereas these functions have been defined in all other if cases. i.e., for TDA3xx and for cascaded TDA2xx case. Do we have to add these functions separately to enable them in TDA2px or is it defined anywhere else in the program? Also, is there any PAD Configuration for running with TDA2Px?

Looking forward to your reply. Thank you!

Best Regards,

Nishant

  • Hi Nishant,

    For the fusion board, you would notice some configuration which is happening under the else if (boardId == BSP_BOARD_VISION) condition under the macro; #if (defined(TDA2PX_BUILD) && defined(PLATFORM_EVM_SI))

    The break down of that piece of code is as follows. It includes:

    1. Host interrupt reception:
    Bsp_Ar12xxGpioInputParams inGpioParamsDef;
    /* GPIO7, Pin 9, CPU Intr 51 */
    inGpioParamsDef.gpioInstId = 6;
    inGpioParamsDef.gpioPinNum = 9;
    inGpioParamsDef.cpuIntrIdForGpio = 51;

    2. I2C configuration channel (Note in the FPD link case the McSPI configuration to the AWR1243 is over FPDLink I2C channel)

    gAr12xx_initParams.devParams[i].i2cDevInst = UB960_ACCESSIBLE_FROM_I2C_INST;
    if (pCfgOut->fusionEnabled == 0U)
    {
    gAr12xx_initParams.devParams[i].i2cDevAddr = D3_AR1243_PORT_0_SENSOR_ADDR + i*2;
    gAr12xx_initParams.devParams[i].desPortMap = i;
    }
    else
    {
    gAr12xx_initParams.devParams[0].i2cDevAddr = D3_AR1243_FUSION_SENSOR_ADDR;
    gAr12xx_initParams.devParams[0].desPortMap = 1;
    }

    3. UART is not used:
    gAr12xx_initParams.devParams[i].uartDevInst = 0xFF;

    4. nReset and the SOP configuration is also done as part of the I2C commands. For the exact sequence refer to ti_components\drivers\pdk_01_10_00_08\packages\ti\drv\vps\examples\utility\src\bsputils_ub960.c
    Function: BspUtils_resetAR12xxToSOP4

    Thanks and Regards,
    Piyali
  • Hello Piyali,

    Thank you for your answer! Point 1 in your answer describes only the Bsp_Ar12xxGpioInputParams. Do we not need any Bsp_Ar12xxGpioOutputParams?

    Also could you explain the functionality of GPIO Expander? The code snippet is given below:

    {0x66, (D3_AR1243_PORT_0_SENSOR_ADDR << 1U), UB960_REG_DELAY_TIME}, /*Bridge alias address (Used to be 0x7c)*/
    {0x5F, 0xE8, UB960_REG_DELAY_TIME}, /*GPIO expander I2C Address*/
    {0x67, (D3RIB_PORT_0_IOEXP_ADDR << 1U), UB960_REG_DELAY_TIME}, /*GPIO expander alias address*/

    Is there any hardware device (GPIO Expander) that is to be used with serializer UB953? If yes, could you explain its function and also provide the part number of this device? In the above code, it appears that it is some kind of I2C device with 0xE8 8-bit address.

    I look forward to your reply. Thank you!


    Best Regards,
    Nishant

  • Hi Nishant,

    The Bsp_Ar12xxGpioOutputParams is not required as the GPIO outputs are via the GPIO IO Expander.

    The GPIO IO expander being used in TCA9539PW-Q1, this gets the inputs from UB953 to toggle the GPIO outputs.

    Thanks and Regards,
    Piyali
  • Hello Piyali,

    Thank you for providing the part number of the GPIO Expander. But now, I am confused on how they are connected in hardware connection aspect. UB953 has 4  GPIOs present, GPIO_0(pin 17), GPIO_1(pin 18). GPIO_2(pin 27) and GPIO_3(pin 28). How are they connected to the TCA95339? Also, could you tell me where in the SDK package the code is defined for the GPIO output functionalities in the GPIO expander?

    I look forward to your reply.

    Best Regards,

    Nishant

  • Nishanth,

    You would notice in the www.ti.com/.../tca9539.pdf the TCA takes I2C as the input.

    The UB953 on the other hand has an I2C output port which can be used to configure this.

    The GPIO output pin numbers can be seen as part of the D3 Engineering schematics for the "RADAR 953 FPD LINK III Interface Board"

    The programming is in the file \ti_components\drivers\pdk_01_XX_XX_XX\packages\ti\drv\vps\examples\utility\src\bsputils_ub960.c function BspUtils_resetAR12xxToSOP4

    Thanks and Regards,
    Piyali
  • Thank you Piyali!

    Best Regards,
    Nishant
  • Hi Piyali,

    Thank you for providing the part number earlier. Since I don't have the Radar 953 FPD Link III Schematic with me, could you tell me why is the "D3RIB_PORT_0_IOEXP_ADDR" value defined as 0x48U (D3RIB_PORT_1_IOEXP_ADDR as 0x50U) in the D3 Interface board, as defined in the bsp_utils960.h file? I checked TCA9539 datasheet, but I couldn't get any information about this.

    I look forward to your reply.
    Thank you!
    Best Regards,
    Nishant
  • Nishant,

    The 0x48 is the alias for the TCA:

    {0x5F, 0xE8, UB960_REG_DELAY_TIME}, /*GPIO expander I2C Address*/
    {0x67, (D3RIB_PORT_0_IOEXP_ADDR << 1U), UB960_REG_DELAY_TIME}, /*GPIO expander alias address*/

    The actual address for TCA is 0xE8.

    Thanks and Regards,
    Piyali
  • Hello Piyali,

    Thank you for the clarification! 

    It would be really great if you could answer this question too:

    http://e2e.ti.com/support/sensors/f/1023/p/744652/2751344#2751344

    In the same bsputils_ub960.c file, line 2458, it sets the SOP Mode 4:

    do{
    /*Set SOP Mode 4*/
    tempAddr = 2;
    tempData = 0x04; /*[7:0] 11O0 0100*/
    status = Bsp_deviceWrite8(
    UB960_ACCESSIBLE_FROM_I2C_INST,
    IOExpAddr,
    &tempAddr,
    &tempData,
    (UInt32) 1U);
    BspOsal_sleep(100);
    retries++;
    }while((status != BSP_SOK) && (retries < maxRetries));
    retries = 0;
    funcStatus |= status;
    BspOsal_sleep(500);

    In the text highlighted as red, you could see that in the comments the mode setting is given as 1100 0100 (0xC4), but in the actual code it is set as 0x04. Do you know which among the two is the correct setting for SOP mode 4?

    Thank you for your help in advance!

    Best Regards,

    Nishant

  • Nishant,

    The value is supposed to be 0x4. The comment is misleading.

    Thanks and Regards,
    Piyali