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.

RTOS/TDA2: RTOS/TDA2

Part Number: TDA2

Tool/software: TI-RTOS

Hi Sir,

I has Vayu EVM board (Rev.H) + SDK 03_03_00_00 and will drive GPIO_5[8] to output high or low.

I refer PDK document "API_Documentation.html" to know how to program it.

--------------------------------------------------------------------------------------

Programming sequence of gpio module is:

  1. Enable the functional clocks for the required GPIO instance.
  2. Perform a pin multiplexing for the required GPIO pin.
  3. Enable the GPIO module using the API GPIOModuleEnable.
  4. Perform a module reset of the GPIO module using the API GPIOModuleReset.
  5. When GPIO is input pin, following configuration is used
    1. Enable/disable debouncing feature for the specified input GPIO pin if required, using the API GPIODebounceFuncControl.
    2. Program the debouncing time, if required using the API GPIODebounceTimeConfig.
    3. Interrupt trigger conditions need to be configured using the API GPIOIntTypeSet.
    4. Enable GPIO to generate interrupts on detection of the specified transitions on the decided GPIO pin using the API GPIOPinIntEnable.
  6. When GPIO is output pin, following configuration is used
    1. A logic HIGH or a logic LOW could be driven on the specified GPIO pin by invoking the API GPIOPinWrite.

--------------------------------------------------------------------------------------

my sample code as below:

// a. Enable the functional clocks for the required GPIO instance.
/* Set the access to the GPMC registers - Enable GPMC Clock */

HW_WR_REG32(SOC_L4PER_CM_CORE_BASE + CM_L4PER_GPIO5_CLKCTRL, 0x101);
while ((HW_RD_REG32(SOC_L4PER_CM_CORE_BASE +
CM_L4PER_GPIO5_CLKCTRL) & (0x00030000U)) != 0x0)
{ ; }

// b. Perform a pin multiplexing for the required GPIO pin.

HW_WR_REG32(SOC_CORE_PAD_IO_REGISTERS_BASE + CTRL_CORE_PAD_MCASP1_AXR6,
(0x60000U | CTRL_CORE_PAD_MCASP1_AXR6_MCASP1_AXR6_MUXMODE_GPIO5_8_14)); //C12

GPIODirModeSet(SOC_GPIO5_BASE, 8, GPIO_DIR_OUTPUT); //C12

// c. Enable the GPIO module using the API GPIOModuleEnable.

GPIOModuleEnable(SOC_GPIO5_BASE);

// d. Perform a module reset of the GPIO module using the API GPIOModuleReset.

GPIOModuleReset(SOC_GPIO5_BASE);

// Set C12 to high.

GPIOPinWrite(SOC_GPIO5_BASE, 8, GPIO_PIN_HIGH); //C12

The sample code still can't drive GPIO_5[8], could you please give me some suggestion.

Thanks.