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.

TMS320F28379D: GPIO Configuration Problem

Part Number: TMS320F28379D


Hi,

I am looking to understand the LAB1 example of driving basic led on the Launchpad. 

The GPIO is configured as below:

GPIO_SetupPinOptions(34, GPIO_OUTPUT, GPIO_PUSHPULL);
GPIO_SetupPinMux(34, GPIO_MUX_CPU2, 0);

A for loop shown below toggles the gpio.  

for(;;)
{
GPIO_WritePin(34, 0); // Turn on LD3
DELAY_US(1000 * 250);
GPIO_WritePin(34, 1); // Turn off LD3
DELAY_US(2000 * 250);
ToggleCount2++;
}

I have referenced the USER MANUAL and the datasheet to understand gpio settings in software.

How is the GPIO 34 configured as an active low pin ? Please let me know where to look for setting a gpio active high or low. 

Kindly tell me the source for finding information regarding the gpio active high or active low configuration. 

Thank you, 

  • Hi,

    Refer to GPIO chapter in device TRM for details on different GPIO configurations.

    Thanks

    Vasudha

  • Vasudha,

    I have referred to the Reference Manual. There are Details on the registers and the configurations settings for peripherals. I understand it is a very silly doubt about a gpio pin being active high or low but it would be of great help if you guide me regarding this information. 

    Thank you

  • Hi Ashrith,

    How is the GPIO 34 configured as an active low pin ? Please let me know where to look for setting a gpio active high or low. 

    Software code is not configuring GPIO pin to be active high or low instead it is simply driving it LOW and HIGH. Now driving GPIO pin LOW turns LED ON and HIGH turns is OFF depends on external hardware. All the GPIOs have internal pull-up which is disable by default but user can enable it if needed. If enabled, then GPIO pin will be driven high by default (after pull is enabled in software) and in that case it make sense to turn LED ON when GPIO is driven LOW.

    Hope this helps.

    Regards,

    Vivek Singh

  • Hi vivek,

    The pull up is not exclusively enabled in the software. Does push pull constitute to enabling the pull up resistor?

    Thank you

  • Yes, I was saying that we only have internal pull-up (not pull down) so if enabled, it'll be driven high by default. As mentioned, LED get activated  on LOW or HIGH depends on board logic.

    Regards,

    Vivek Singh