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.

MSPM0L1306:About GPIO interrupts and events

Part Number: MSPM0L1306
Other Parts Discussed in Thread: SYSCONFIG

I think there are three events: "CPU_INT", "GEN_EVENT0", and "GEN_EVENT1".
"CPU_INT" is used for interrupts, and when the flag is set, a subroutine (INT_GROUP1) is executed.
I wonder if "GEN_EVENT0" and "GEN_EVENT1" have an interrupt destination like "CPU_INT", and when the flag is set, the specified subroutine is executed?

Also, I would like to know how to set "GEN_EVENT0" and "GEN_EVENT1" and how they behave during execution.

  • Hi,

    GEN_EVENT0/1 has the destination, when the work is done it will automatically trigger the action, which will not through CPU.

    For example, you can use Timer to trigger GPIO. As the timer is count down to zero, an event will happen and trigger GPIO to set/clear/toggle.

    For detailed information, please see TRM: MSPM0 L-Series 32-MHz Microcontrollers Technical Reference Manual (Rev. C) (ti.com) Event chapter.

    You can use Sysconfig,

    To get more detailed usage, please see SDK demo code.

    B.R.

    Zoey

  • Since it was stated that pins 0 to 15 share channel FPUB0 (GEN_EVENT0?) and pins 16 to 31 share the second channel FPUB1 (GEN_EVENT1?), set GPIO pin 0 to event as in the program above. Then, will the remaining pins 1 to 15 be unable to be used for event settings?

    Also, is it possible to use this event to configure settings such as starting a timer when GPIO input is detected?

  • Then, will the remaining pins 1 to 15 be unable to be used for event settings?

    Yes.

    is it possible to use this event to configure settings such as starting a timer when GPIO input is detected?

    Yes, please see demo code:E2E_Event_GPIOtoTimer_L.zip

    B.R.

    Zoey

  • I was able to understand it.
    thank you.

    By the way, if GPIO is set to the event "GEN_EVENT0" or "GEN_EVENT1", "CPU_INT" will not operate when GPIO input is detected, and the subroutine (INT_GROUP1) will not be executed.
    If it is not set to the contrary, the subroutine (INT_GROUP1) will be executed from "CPU_INT". Is it safe to think so?

  • No,

    The event will not through CPU, so the EVENT and interrupt can be happened at same time.

  • For example, does this mean that it is possible to set both "interrupt" and "event" to GPIO_PA10?
    Or can each pin only be set to either "interrupt" or "event"?

    Also, regarding the "event" operation, does the fact that it does not go through the CPU mean that the "event" operation is performed simultaneously in parallel with the main program and subprogram?

  • For example, does this mean that it is possible to set both "interrupt" and "event" to GPIO_PA10?
    Or can each pin only be set to either "interrupt" or "event"?

    You can set both oh them.

    Also, regarding the "event" operation, does the fact that it does not go through the CPU mean that the "event" operation is performed simultaneously in parallel with the main program and subprogram?

    Yes, you are right. 

    For example, if you use GPIO input interrupt to light LED and also use its event to light another LED. The result is that both of them are lighted.

    I've tested this experimentally。

    B.R.

    Zoey