F28-F29 Software Migration Guide  1.00.00.00
Interrupt

The hardware IP used as interrupt controller in the F28 device and F29 devices are different. F28 devices has the PIE (Peripheral Interrupt Expansion) module and the F29 devices has the PIPE (Peripheral Interrupt Priority and Expansion) module. Refer to the hardware migration guide for more details on the differences between the hardware IPs.

Interrupt list

F29 driverlib provides the header file hw_ints.h with list of all interrupt present in the device. The interrupt macro names matches the names used in F28, except the following scenarios :

  • In F28 devices, INT_RTOS channel was used for ERAD interrupts. In F29 devices, the channel is named INT_ERAD.
  • In F28 devices, INT_WAKE channel was used for watchdog interrupt as well. In F29 devices, there are separate INT_WAKE and INT_WD channels.
  • Following interrupts are renamed :
    • INT_WAKE->INT_LPM_WAKE
    • INT_CIPC0-3 -> INT_IPC_1_1-4, INT_IPC_2_1-4
    • INT_DMA_CH1-6 -> INT_RTDMA1CH1-10, INT_RTDMA2CH1-10
    • INT_FLSS -> INT_FLC1, INT_FLC2
    • INT_SDFMx, INT_SDFMxDRy -> INT_SDx_ERR, INT_SDx_FLTy_DR
  • Following interrupt channels are not available :
    • INT_DATALOG
    • INT_EMU
    • INT_ILLEGAL - This is part of INT_NMI
    • INT_USERx - INT_SWx channels can be used instead.
    • INT_SYS_ERR - All system errors are routed to ESM.
    • INT_MCANx_ECC - The error events are routed to ESM.

Interrupt priorities and nesting

In the PIE module, priorities of the interrupts are fixed in hardware. C2000ware provides a framework to configure priorities and nesting in software by modifying the IER registers in the ISRs. This overhead can be avoided in F29 devices as the PIPE module supports configurable hardware priorities and nesting of interrupts. In case priorities are left as default (value = 255), the index of the interrupt channel is used for prioritization. In addition, PIPE has more enhanced features including real-time interrupts (automatic context save and restore), nesting groups and other safety features. For more details, please refer to the device TRM / hardware migration guide.

Note
The order in which interrupts are arranged in the PIE and PIPE and different. Users migrating from F28 to F29 devices should make sure the priorities are configured as per the application need. The driverlib function Interrupt_setPriority may be used for configuring the priorities of individual interrupt channels.

Interrupt Service Routines (ISRs)

  • The ISRs in F29 application should be defined with one of the following attributes. In case the attributes are not used, or incorrect attribute is used, an error event is generated.
    • attribute((interrupt("INT"))) - In case of normal INTs
    • attribute((interrupt("RTINT"))) - In case of RTINTs
    • attribute((interrupt("RTINT"))) - In case of NMI
  • On entering the ISR, hardware automatically disables INTE bit and hence all INTs will be disabled. To enable nesting of INTs, application must call the instruction EINT/ENINT which sets the INTE bit. RTINTs are always enabled and the INTE bit configuration has no impact. Unlike ISRs in F28 devices, user application need not modify the individual interrupt channel enable state inside the ISR. Hardware will make sure only the interrupts which are configured with higher priority and in an higher nesting group can preempt an ISR.
  • PIPE does not have the concept of PIE group and hence the ACK-ing of the PIE group at the end of the ISR (Interrupt_clearACKGroup) is not required.

Driverlib API mapping

The following tables lists differences in driverlib APIs available in these devices :

F28 Function F29 Function Comments
Interrupt_enableGlobal Interrupt_enableGlobal In F28, this function enables the interrupt in the CPU and returns true if was disabled when the function was called.In F29, this enables INTs and RTINTs in the PIPE module. RTINTs are always enabled in the CPU. Use the macro EINT/ENINT for enabling interrupts in the CPU. F29 function does not return any value
Interrupt_disableGlobal Interrupt_disableGlobal In F28, this function disables the interrupt in the CPU and returns true if was disabled when the function was called.In F29, this disables INTs and RTINTs in the PIPE module. RTINTs are always enabled in the CPU. Use the macro DINT/DISINT for disabling interrupts in the CPU. F29 function does not return any value
Interrupt_illegalOperationHandler - Not available. In F29, this is same as NMI Handler
Interrupt_enableInCPU - Not applicable for F29. EINT/ENINT instruction enables all the INTs.
Interrupt_disableInCPU - Not applicable for F29. DINT/DISINT instruction diables all the INTs.
Interrupt_clearACKGroup - Not applicable for F29. PIPE does not have the concept of groups and hence acking the group is not required.
Interrupt_enablePIE - Not applicable for F29. Same as Interrupt_enableGlobal in F29
Interrupt_disablePIE - Not applicable for F29. Same as Interrupt_disableGlobal in F29

New functions added in F29 interrupt driver :

  • Interrupt_configChannel
  • Interrupt_configNMI
  • Interrupt_force
  • Interrupt_clearFlag
  • Interrupt_clearOverflowFlag
  • Interrupt_setThreshold
  • Interrupt_setGroupMask
  • Interrupt_setPriority
  • Interrupt_setContextID
  • Interrupt_setLinkOwner
  • Interrupt_setAPILink
  • Interrupt_setActiveContextID
  • Interrupt_enableSupervisorIgnoreINTE
  • Interrupt_disableSupervisorIgnoreINTE
  • Interrupt_setRTINTSPWarning
  • Interrupt_setINTSP
  • Interrupt_lockBootLinkUpdates
  • Interrupt_lockRegister
  • Interrupt_unlockRegister
  • Interrupt_commitRegister