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/TMS320F28379D: GPIO_Sttings

Part Number: TMS320F28379D
Other Parts Discussed in Thread: CONTROLSUITE

Tool/software: Code Composer Studio

hello

how to configure the registers for the GPIOs

  • Hi,

    You can refer to Configuration Overview section in TM320F2837xD TRM under GPIO. To summarize you need to:

    1. Choose the peripherals as per application need. Please note that all the settings are wrt to GPIO number here. Eg. EPWM1

    2. Configure the GPyMUX1/2 & GPyGMUX1/2 for pin musing selection for GPIO.

    3. Enable pull up resistors using GPyPUD registers.

    4. Select input qualification if required using GPyQSEL1 & GPyQSEL2 registers.

    Additionally you can also refer to gpio_setup_cpu01 example in ControlSUITE for sample code.

    In case of analog pins Eg. ADC, all analog pins are ADC inputs by default. To switch to the DAC on a pin shared between the ADC and DAC, set the DACOUTEN bit (the ADC input doesn't need to be disabled; it won't affect the DAC operation)



    Thanks
    Vasudha
  • THANK YOU
    In my application
    Buffer circuit is connected to GPIO26,27,25 to LEDs RED and Green
    so i want check the input data processing through this LEDs..
  • Hi,

    Please find below a sample configuration for GPIO.
    EALLOW;
    GpioCtrlRegs.GPAPUD.bit.GPIO25 = 0; // Enable pullup on GPIO25
    GpioCtrlRegs.GPAMUX2.bit.GPIO25 = 0; // GPIO25 = GPIO25
    GpioCtrlRegs.GPADIR.bit.GPIO25 = 1; // GPIO25 = output
    EDIS;

    Thanks
    Vasudha

  • Hi
    GpioCtrlRegs.GPAPUD.bit.GPIO25 = 0; // Enable pullup on GPIO25
    what is the means of GPAPUD and GPAMUX2 and GPADIR
    where i can use this different configuration ?
    how can i configured ?
    what is the means of Enable pullup on GPIO25 and GPIO25 = GPIO25 and GPIO25 = output?
  • Hi,
    Please refer Technical reference manual for information related to GPIO registers( GPAPUD, GPAMUX2, GPADIR)

    GpioCtrlRegs.GPAPUD.bit.GPIO25 = 0; // Enable pullup on GPIO25. It is useful to steer an input pin to a known state if no input is present. A pull-up will make sure the pin is up without taking in too much current

    GpioCtrlRegs.GPAMUX2.bit.GPIO25 = 0; // gpio25 pin mux is configured for gpio. Other possible muxing options can be OUTPUTXBAR2, EQEP2B, MDRB, SPISOMIB, SD_C5.

    GpioCtrlRegs.GPADIR.bit.GPIO25 = 1; // GPIO25 = output means gpio 25 is configured as output


    Thanks
    Vasudha
  • Thank you
    so in my application
    GpioCtrlRegs.GPAPUD.bit.GPIO25 = 0;
    to cheek the stats of ISR
    i am current