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/LAUNCHXL-F28379D: GPIO_intilization

Part Number: LAUNCHXL-F28379D

Tool/software: Code Composer Studio

Hello

i am try to understaning the example of Trip_zone

what is the meaning of this loop and InputXbarRegs.INPUT1SELECT = 12; this one.

void InitTzGpio(void)

{

    //

    // For External Trigger, GPIO12 as the trigger for TripZone

    //

    GpioCtrlRegs.GPAPUD.bit.GPIO12 = 0;    // Enable pull-up on GPIO12 (TZ1)

 

    GpioCtrlRegs.GPAQSEL1.bit.GPIO12 = 3;  // Asynch input GPIO12 (TZ1)

 

    EALLOW;

    InputXbarRegs.INPUT1SELECT = 12;

    EDIS;

 

    //

    // For monitoring when the TZ Interrupt has been entered

    //

    EALLOW;

    GpioCtrlRegs.GPAPUD.bit.GPIO11 = 1;    // Disable pull-up on GPIO0 (EPWM1A)

    GpioCtrlRegs.GPAMUX1.bit.GPIO11 = 0;   // Configure GPIO0 as EPWM1A

    GpioCtrlRegs.GPADIR.bit.GPIO11 = 1;

    EDIS;

}

  • Hi kudithi  ,

    InputXbarRegs.INPUT1SELECT = 12; means Select GPIO12 for INPUT1 signal .

     

    See the diagram as per the TRM for F2837xD

    The GPIO uses the input XBAR to connect to INPUT 1 that is used as a TRIP1 interrupt.

    Regards .