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.

TMS570LC4357: DIO interrupt for user button GIOA7 in TMDX570LC43HDK

Part Number: TMS570LC4357
Other Parts Discussed in Thread: TMDX570LC43HDK, HALCOGEN

DIO interrupt for user button GIOA7 in TMDX570LC43HDK

Enable GIO Driver 

PSL should be internal pull up or pull down because the external circuit of TMDX570LC43HDK has pullup 

VIM channel GIO is set HIGH.


Is this gioGetBit is works in interrupt method ?

Please provide me the example if possible ?

  • When you press the button (GIOA[7]), you will get a GIO interrupt. The while() will be interrupted by GIO ISR. You can insert your code to gioNotification().

  • Hi Wang,

    How to use  gioNotification() API ?

  • Hello,

    gioNotification() is a callback function of GIO ISR (located in gio.c), it is used for users to insert their own code. During execution of the notification routine for a given interrupt request, the interrupt remains disable at the CPU level (for IRQ). It is wise to have your notification routine as short as possible to avoid latency on any other pending interrupt.

    The GIO interrupt is edge-sensitive (rising edge or falling edge, or both), not level-sensitive. 

  • Hi Wang,

    Can you share me the example code which uses the gioNotification callback function of GIO ISR.

    edge-sensitive (rising edge or falling edge or both ) example too. if possible.

  • I've created a basic project using HALCoGen 04.07.01 that demonstrates the usage of interrupt with GIO module.

    The GIO_A7 is used to detect Rising Edge on the pin. In order to make this test code standalone, I also drive the GIO_A7 as output, to create the rising edge condition.

    When the interrupt condition is met, the CPU will branch to gioHighLevelInterrupt(void) in GIO.c. From there, gioNotification(gioPORTA, offset) is called. In this routine, you will write your own code. In my case, I just reset the GIO_A7 to 0.