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.

LAUNCHXL2-TMS57012: LaunchPad LAUNCHXL2-TMS57012 : GIO HighLvl Interrupt

Part Number: LAUNCHXL2-TMS57012
Other Parts Discussed in Thread: HALCOGEN

Hello,

I recently bought the LAUNCHXL2-TMS57012 (TMS570ls1224PGE on it) for prototyping purpose. I'm currently getting started with it, but I have some issues :

For what I understood from the LAUNCHXL2-TMS57012 schematics, one of the switch button (S3) is linked to GIOB_2 (if configured as an input I guess). So I tried to use GIO interruption but even setting all GIO as inputs, pushing the button never rise any flag in GIOFLG register. So this is my first issue with this pad : does anyone know how switch buttons and gio are related on it ?

My second issue is about interruption : I made a program which is basically something like

gioInit();

vimInit()

_enable_interrupt();

while (1)

{

LED_A_ON();

LED_A_OFF();

}

I configured the GIO_INTDET register  filled with "1" which means "interrupt enabled on both rising and falling ege",  enabled interruptions etc and set breakpoints on gioHighLevelInterrupt and gioLowLevelInterrupt. only the low level works. I tried to configure the INTDET and POL registers to have only rising edge : program nevers break in the interrupt.

So there is probably something I missed reading the datasheet, and I would appreciate some help on this, if possible not using HALCoGen but with direct register configuration (So I can understand more how it works)

Thanks

Audry

  • Hello Audry,

    Thanks for using the E2E for your questions.

    For your initial question regarding GIOB[2], please make sure that the IOMM mux configuration is set appropriately to accept input from the right pin. You can find more information regarding which pin is connected to the button by reviewing the schematic on the Wiki page processors.wiki.ti.com/.../LAUNCHXL2-TMS57012

    In regard to your interrupt question, I will address that tomorrow when I have better access to the documentation and can provide more detailed explanations.
  • Hello, thanks for answering !

    Reading the schematics (processors.wiki.ti.com/.../LAUNCHXL2-TMS57012) on, page 10 I can see that the S3 switch is supposed to be linked on GPIOB_2. In HALCOGen, on the "PINMUX" tab, checking the "GIOB" box does nothing, so I assume there is no specific mux configration to do with it ?

    About the interrupt question, thanks for your time, I'll wait for your help

  • Hi Audry,

    Checking the GPIOB box causes the "terminal" boxes on pin 55 to be closed indicating that GPIOB_2 functionality is brought to the pin. The line is a faint gray color because if GPIOB is enabled through the check box, there is no other choice for this pin so GPIOB_2 has to be brought out. i.e., it can't be changed so its grayed out. If you uncheck the GPIOB at the top of the page you will see that the faint line goes away.

    i.e. Without GPIOB peripherl enabled:

    i.e. With GPIOB peripherl enabled:

    In regard to your interrupts, I suspect what is happening is that you are getting interrupts on both edges as you have configured but only the low level ISR is being triggered because the interrupt has only the one interrupt line coming from the GPIO pin (see diagram below).

    I think what might be confusing is the nomenclature used for the interrupt channels. i.e., gioHighLevelInterrupt and gioLowLevelInterrupt. In this case, the high and low level in the names of the interrupts don't mean the physical level of the signal but the priority of the channel based on the interrupt channel ID in its default state. To check this, can you put a test condition to increment a lo counter when the GPIOB is low during the interrupt and a high counter when the GIOB is high during the ISR? This should allow you to capture both edges in the same ISR.

  • I apologize for replying to this older discussion, but I'm having similar problems using the LAUNCHXL2-TMS57012 switch B pushbutton. I tried using the interrupts originally, but have moved to just checking eh pin manually in my infinite loop using gioGetBit. The only time my value changes is when I change the pull-up/down resistor configuration in Halcogen. Are there any good instructions or examples on using these buttons? I have checked pinmux as described above.

    Thanks for your help,
    -Ryan