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.

CCS/AWR1443BOOST: How to write to GPIO pins in mmw demo

Part Number: AWR1443BOOST
Other Parts Discussed in Thread: MMWAVE-SDK,

Tool/software: Code Composer Studio

Hi,

In the mmw demo code it has a section called mmwave demo task where GPIO is initialised. However, when i try to use GPIO_write(SOC_XWR14XX_GPIO_0 ,1) to set the GPIO_0 high, it gives me this error:

[Cortex_R4_0] Debug: Launched the Initialization Task
Debug: HWA has been initialized
Debug: EDMA instance 0 has been initialized

{module#8}: "src/gpio.c", line 925: error {id:0x10000, args:[0x1a558, 0x1a558]}

xdc.runtime.Error.raise: terminating execution

Im not sure why my gpio pin isnt high when i test it while the demo is running. Any help would be appreciated.

Thanks

void MmwDemo_initTask(UArg arg0, UArg arg1)
{
    int32_t             errCode;
    MMWave_InitCfg      initCfg;
    UART_Params         uartParams;
    Task_Params         taskParams;

    /* Debug Message: */
    System_printf("Debug: Launched the Initialization Task\n");

    /*****************************************************************************
     * Initialize the mmWave SDK components:
     *****************************************************************************/

    /* Initialize the UART */
    UART_init();

    /* Initialize the Mailbox */
    Mailbox_init(MAILBOX_TYPE_MSS);

    /* Initialize the GPIO */
    GPIO_init ();

    /* Initialize the Data Path: */
    MmwDemo_dataPathInit(&gMmwMCB.dataPathObj);

    /*****************************************************************************
     * Open & configure the drivers:
     *****************************************************************************/
    GPIO_setConfig(SOC_XWR14XX_GPIO_0, GPIO_CFG_OUTPUT);

    GPIO_write(SOC_XWR14XX_GPIO_0,1);
..........

Saad

  • Hello Saad,

    Is there any specific reason to use the GPIO_0 ? This pin is muxed with other signals as well.

    The mmwave demo has the code to configure the GPIO to start or stop the sensor.

    You can refer to function "MmwDemo_sensorMgmtTask()" in  "$mmwave-sdk\packages\ti\demo\xwr14xx\mmw\sensor_mgmt.c" . Here the GPIO_1 is configured as in Input and GPIO_2 is configured as an Output .

    The GPIO_1(Input) receives the input from the switch SW1 on the awr1443boost EVM to either start or stop the sensor.

    The GPIO_2 is connected to LED on the awr1443boost EVM and you can see the LED turn ON/Off based on the output state of the GPIO_2

    Let me know if you need further information on using the GPIO.

    Thanks,

    Raghu

  • Hi,

    I want to use the GPIO pin to light up an external LED when there is an object 0.5 metres away from the sensor. So i can use other GPIO's like 19 if i want but will i have to force the pin to be muxed as a GPIO pin rather than a SPI pin?

    Thanks
  • Hello Saad,
    You can just modify the existing mmwave demo application and use the GPIO_2 for your purpose.

    To turn ON the LED when the object is at 0.5m :
    GPIO_write (SOC_XWR14XX_GPIO_2, 1U);

    To turn OFF the LED when the object is far :
    GPIO_write (SOC_XWR14XX_GPIO_2, 0U);

    You can use the existing GPIO-LED configuration on the awr1443boost for this purpose.

    If you want to use any other GPIO, you can choose to use the GPIO that is not muxed with any of the peripherals that you are using in your application and follow the same reference code to toggle the GPIO.

    Thanks,
    Raghu