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.

TM4C123GH6PM: Unable to pend interrupt

Part Number: TM4C123GH6PM

I'm trying USB Bulk Device Class with TM4C123, and want to temporarily pend the interrupt to avoid conflicts with other functions.

I tried the following API, but couldn't stop the interrupt.
Is my approach wrong? Could anyone give me any ideas?

IntPendSet( INT_USB0 );

  • Hello Yamazaki-san,

    Are you trying to avoid conflicts with another ISR or with non-interrupt functions?

    Here is the full description of IntPendSet in DriverLib:

    //! The specified interrupt is pended in the interrupt controller.  The
    //! \e ui32Interrupt parameter must be one of the valid \b INT_* values listed
    //! in Peripheral Driver Library User's Guide and defined in the inc/hw_ints.h
    //! header file.  Pending an interrupt causes the interrupt controller to
    //! execute the corresponding interrupt handler at the next available time,
    //! based on the current interrupt state priorities.  For example, if called by
    //! a higher priority interrupt handler, the specified interrupt handler is not
    //! called until after the current interrupt handler has completed execution.
    //! The interrupt must have been enabled for it to be called.

    So as the description mentions, the pending of the interrupt causes the interrupt controller to execute the handler at the next available time based on priorities. So you can use this to keep a higher priority interrupt from interrupting a lower priority interrupt under certain conditions.

    I am not sure depending how long you will ignore the USB interface if you won't cause an issue there too where the host believes the device timed out. Depending what you are doing and for how long, you may just need to disconnect the bus and then reconnect... interrupting USB can be a bit tricky to do without having concerns about a broken connection or data loss. Something to keep in mind.