CC26xx Driver Library
[interrupt] Interrupt

Functions

static bool IntMasterEnable (void)
 Enables the processor interrupt. More...
 
static bool IntMasterDisable (void)
 Disables the processor interrupt. More...
 
void IntRegister (uint32_t ui32Interrupt, void(*pfnHandler)(void))
 Registers a function to be called when an interrupt occurs. More...
 
void IntUnregister (uint32_t ui32Interrupt)
 Unregisters the function to be called when an interrupt occurs. More...
 
void IntPriorityGroupingSet (uint32_t ui32Bits)
 Sets the priority grouping of the interrupt controller. More...
 
uint32_t IntPriorityGroupingGet (void)
 Gets the priority grouping of the interrupt controller. More...
 
void IntPrioritySet (uint32_t ui32Interrupt, uint8_t ui8Priority)
 Sets the priority of an interrupt. More...
 
int32_t IntPriorityGet (uint32_t ui32Interrupt)
 Gets the priority of an interrupt. More...
 
void IntEnable (uint32_t ui32Interrupt)
 Enables an interrupt. More...
 
void IntDisable (uint32_t ui32Interrupt)
 Disables an interrupt. More...
 
void IntPendSet (uint32_t ui32Interrupt)
 Pends an interrupt. More...
 
bool IntPendGet (uint32_t ui32Interrupt)
 Query whether an interrupt is pending. More...
 
void IntPendClear (uint32_t ui32Interrupt)
 Unpends an interrupt. More...
 
static void IntPriorityMaskSet (uint32_t ui32PriorityMask)
 Sets the priority masking level. More...
 
static uint32_t IntPriorityMaskGet (void)
 Gets the priority masking level. More...
 

Detailed Description

Introduction

The interrupt controller API provides a set of functions for dealing with the nested vectored interrupt controller (NVIC). Functions are provided to enable and disable interrupts, register interrupt handlers, and set the priority of interrupts.

The event sources that trigger the interrupt lines in the NVIC are controlled by the MCU event fabric. All event sources are statically connected to the NVIC interrupt lines except one which is programmable. For more information about the MCU event fabric, see the MCU event fabric API.

The NVIC provides global interrupt masking, prioritization, and handler dispatching. Devices within the CC26xx family support 34 interrupt lines and 8 priority levels from 0 to 7 with 0 being the highest priority. Individual interrupt sources can be masked, and the processor interrupt can be globally masked as well (without affecting the individual source masks).

The NVIC is tightly coupled with the System CPU. When the processor responds to an interrupt, the NVIC supplies the address of the function to handle the interrupt directly to the processor.

Each interrupt source can be individually enabled and disabled through:

The global processor interrupt can be enabled and disabled with the following functions:

This does not affect the individual interrupt enable states. Masking of the processor interrupt can be used as a simple critical section (only an NMI can interrupt the processor while the processor interrupt is disabled), although masking the processor interrupt can have adverse effects on the interrupt response time.

It is possible to access the NVIC to see if any interrupts are pending and manually clear pending interrupts which have not yet been serviced or set a specific interrupt as pending to be handled based on its priority. Pending interrupts are cleared automatically when the interrupt is accepted and becomes active (being executed). The functions to read, clear, and set pending interrupts are:

The interrupt prioritization in the NVIC allows handling of higher priority interrupts before lower priority interrupts, as well as allowing preemption of lower priority interrupt handlers by higher priority interrupts. The priority of each interrupt source can be set and examined using:

Interrupts can be masked based on their priority such that interrupts with the same or lower priority than the mask are effectively disabled. This can be configured with:

Subprioritization is also possible; instead of having 3 bits of preemptable prioritization (8 levels), the NVIC can be configured for 3 - M bits of preemptable prioritization and M bits of subpriority. In this scheme, two interrupts with the same preemptable prioritization but different subpriorities do not cause a preemption; instead tail chaining is used to process the two interrupts back-to-back. If two interrupts with the same priority (and subpriority if so configured) are asserted at the same time, the one with the lower interrupt number is processed first. Subprioritization is handled by:

Interrupt handlers can be configured in one of two ways; statically at compile time or dynamically at run time. Static configuration of interrupt handlers is accomplished by editing the interrupt handler table in the startup code of the application. When statically configured, the interrupts must be explicitly enabled in the NVIC through IntEnable() before the processor can respond to the interrupt (in addition to any interrupt enabling required within the peripheral). Statically configuring the interrupt table provides the fastest interrupt response time because the stacking operation (a write to SRAM) can be performed in parallel with the interrupt handler table fetch (a read from Flash), as well as the prefetch of the interrupt handler (assuming it is also in Flash).

Alternatively, interrupts can be configured at runtime using (or the corresponding in each individual module API):

Registering an interrupt handler is a simple matter of inserting the handler address into the table. By default, the table is filled with pointers to an internal handler that loops forever; it is an error for an interrupt to occur when there is no interrupt handler registered to process it. Therefore, interrupt sources should not be enabled before a handler has been registered, and interrupt sources should be disabled before a handler is unregistered. When using IntRegister(), the interrupt must also be enabled as before; when using the function in each individual function API, IntEnable() is called by the driver and does not need to be called by the application. Run-time configuration of interrupts adds a small latency to the interrupt response time because the stacking operation (a write to SRAM) and the interrupt handler table fetch (a read from SRAM) must be performed sequentially.

Run-time configuration of interrupt handlers requires that the interrupt handler table is placed on a 1-kB boundary in SRAM (typically, this is at the beginning of SRAM). Failure to do so results in an incorrect vector address being fetched in response to an interrupt. The vector table is in a section called vtable and should be placed appropriately with a linker script.

Function Documentation

void IntDisable ( uint32_t  ui32Interrupt)

Disables an interrupt.

The specified interrupt is disabled in the interrupt controller. Other enables for the interrupt (such as at the peripheral level) are unaffected by this function.

Parameters
ui32Interruptspecifies the interrupt to be disabled.
Returns
None

Referenced by CRYPTOAesEcbStatus(), CRYPTOAesLoadKey(), CRYPTOCcmAuthEncrypt(), CRYPTOCcmAuthEncryptStatus(), CRYPTOCcmInvAuthDecrypt(), CRYPTOCcmInvAuthDecryptStatus(), CRYPTOIntUnregister(), FlashIntUnregister(), I2CIntUnregister(), I2SIntUnregister(), IOCIntUnregister(), SSIIntUnregister(), TimerIntUnregister(), TRNGIntUnregister(), UARTIntUnregister(), uDMAIntUnregister(), and WatchdogIntUnregister().

325 {
326  // Check the arguments.
327  ASSERT(ui32Interrupt < NUM_INTERRUPTS);
328 
329  // Determine the interrupt to disable.
330  if(ui32Interrupt == INT_MEMMANAGE_FAULT)
331  {
332  // Disable the MemManage interrupt.
333  HWREG(NVIC_SYS_HND_CTRL) &= ~(NVIC_SYS_HND_CTRL_MEM);
334  }
335  else if(ui32Interrupt == INT_BUS_FAULT)
336  {
337  // Disable the bus fault interrupt.
338  HWREG(NVIC_SYS_HND_CTRL) &= ~(NVIC_SYS_HND_CTRL_BUS);
339  }
340  else if(ui32Interrupt == INT_USAGE_FAULT)
341  {
342  // Disable the usage fault interrupt.
343  HWREG(NVIC_SYS_HND_CTRL) &= ~(NVIC_SYS_HND_CTRL_USAGE);
344  }
345  else if(ui32Interrupt == INT_SYSTICK)
346  {
347  // Disable the System Tick interrupt.
348  HWREG(NVIC_ST_CTRL) &= ~(NVIC_ST_CTRL_INTEN);
349  }
350  else if((ui32Interrupt >= 16) && (ui32Interrupt <= 47))
351  {
352  // Disable the general interrupt.
353  HWREG(NVIC_DIS0) = 1 << (ui32Interrupt - 16);
354  }
355  else if(ui32Interrupt >= 48)
356  {
357  // Disable the general interrupt.
358  HWREG(NVIC_DIS1) = 1 << (ui32Interrupt - 48);
359  }
360 }
#define ASSERT(expr)
Definition: debug.h:74
void IntEnable ( uint32_t  ui32Interrupt)

Enables an interrupt.

The specified interrupt is enabled in the interrupt controller. Other enables for the interrupt (such as at the peripheral level) are unaffected by this function.

Parameters
ui32Interruptspecifies the interrupt to be enabled.
Returns
None

Referenced by CRYPTOAesCbc(), CRYPTOAesEcb(), CRYPTOCcmAuthEncrypt(), CRYPTOCcmInvAuthDecrypt(), CRYPTOIntRegister(), FlashIntRegister(), I2CIntRegister(), I2SIntRegister(), IOCIntRegister(), SSIIntRegister(), TimerIntRegister(), TRNGIntRegister(), UARTIntRegister(), uDMAIntRegister(), and WatchdogIntRegister().

281 {
282  // Check the arguments.
283  ASSERT(ui32Interrupt < NUM_INTERRUPTS);
284 
285  // Determine the interrupt to enable.
286  if(ui32Interrupt == INT_MEMMANAGE_FAULT)
287  {
288  // Enable the MemManage interrupt.
289  HWREG(NVIC_SYS_HND_CTRL) |= NVIC_SYS_HND_CTRL_MEM;
290  }
291  else if(ui32Interrupt == INT_BUS_FAULT)
292  {
293  // Enable the bus fault interrupt.
294  HWREG(NVIC_SYS_HND_CTRL) |= NVIC_SYS_HND_CTRL_BUS;
295  }
296  else if(ui32Interrupt == INT_USAGE_FAULT)
297  {
298  // Enable the usage fault interrupt.
299  HWREG(NVIC_SYS_HND_CTRL) |= NVIC_SYS_HND_CTRL_USAGE;
300  }
301  else if(ui32Interrupt == INT_SYSTICK)
302  {
303  // Enable the System Tick interrupt.
304  HWREG(NVIC_ST_CTRL) |= NVIC_ST_CTRL_INTEN;
305  }
306  else if((ui32Interrupt >= 16) && (ui32Interrupt <= 47))
307  {
308  // Enable the general interrupt.
309  HWREG(NVIC_EN0) = 1 << (ui32Interrupt - 16);
310  }
311  else if(ui32Interrupt >= 48)
312  {
313  // Enable the general interrupt.
314  HWREG(NVIC_EN1) = 1 << (ui32Interrupt - 48);
315  }
316 }
#define ASSERT(expr)
Definition: debug.h:74
static bool IntMasterDisable ( void  )
inlinestatic

Disables the processor interrupt.

Prevents the processor from receiving interrupts. This does not affect the set of interrupts enabled in the interrupt controller; it just gates the single interrupt from the controller to the processor.

Returns
Returns:
  • true : Interrupts were already disabled when the function was called.
  • false : Interrupts were enabled and are now disabled.
158 {
159  // Disable processor interrupts.
160  return(CPUcpsid());
161 }
uint32_t CPUcpsid(void)
Disable all external interrupts.
Definition: cpu.c:91

Here is the call graph for this function:

static bool IntMasterEnable ( void  )
inlinestatic

Enables the processor interrupt.

Allows the processor to respond to interrupts. This does not affect the set of interrupts enabled in the interrupt controller; it just gates the single interrupt from the controller to the processor.

Returns
Returns:
  • true : Interrupts were disabled and are now enabled.
  • false : Interrupts were already enabled when the function was called.
138 {
139  // Enable processor interrupts.
140  return(CPUcpsie());
141 }
uint32_t CPUcpsie(void)
Enable all external interrupts.
Definition: cpu.c:215

Here is the call graph for this function:

void IntPendClear ( uint32_t  ui32Interrupt)

Unpends an interrupt.

The specified interrupt is unpended in the interrupt controller. This will cause any previously generated interrupts that have not been handled yet (due to higher priority interrupts or the interrupt no having been enabled yet) to be discarded.

Parameters
ui32Interruptspecifies the interrupt to be unpended.
Returns
None

Referenced by CRYPTOAesCbc(), CRYPTOAesEcb(), CRYPTOCcmAuthEncrypt(), and CRYPTOCcmInvAuthDecrypt().

441 {
442  // Check the arguments.
443  ASSERT(ui32Interrupt < NUM_INTERRUPTS);
444 
445  // Determine the interrupt to unpend.
446  if(ui32Interrupt == INT_PENDSV)
447  {
448  // Unpend the PendSV interrupt.
449  HWREG(NVIC_INT_CTRL) |= NVIC_INT_CTRL_UNPEND_SV;
450  }
451  else if(ui32Interrupt == INT_SYSTICK)
452  {
453  // Unpend the SysTick interrupt.
454  HWREG(NVIC_INT_CTRL) |= NVIC_INT_CTRL_PENDSTCLR;
455  }
456  else if((ui32Interrupt >= 16) && (ui32Interrupt <= 47))
457  {
458  // Unpend the general interrupt.
459  HWREG(NVIC_UNPEND0) = 1 << (ui32Interrupt - 16);
460  }
461  else if(ui32Interrupt >= 48)
462  {
463  // Unpend the general interrupt.
464  HWREG(NVIC_UNPEND1) = 1 << (ui32Interrupt - 48);
465  }
466 }
#define ASSERT(expr)
Definition: debug.h:74
bool IntPendGet ( uint32_t  ui32Interrupt)

Query whether an interrupt is pending.

This function will check whether the specified interrupt is pending in the interrupt controller. The interrupt must have been enabled for it to be called, so an interrupt can very well be pending waiting to be enabled or waiting for an interrupt of higher priority to be done executing.

Note
This function does not support the lower 16 IRQ vectors which are hardware defined for the System CPU.
Parameters
ui32Interruptspecifies the interrupt to be queried.
Returns
Returns:
  • true : Specified interrupt is pending.
  • false : Specified interrupt is not pending.
408 {
409  uint32_t ui32IntPending;
410 
411  // Check the arguments.
412  ASSERT(ui32Interrupt < NUM_INTERRUPTS);
413 
414  // Assume no interrupts are pending.
415  ui32IntPending = 0;
416 
417  // The lower 16 IRQ vectors are unsupported by this function
418  if (ui32Interrupt < 16)
419  {
420 
421  return 0;
422  }
423 
424  // Subtract lower 16 irq vectors
425  ui32Interrupt -= 16;
426 
427  // Check if the interrupt is pending
428  ui32IntPending = HWREG(NVIC_PEND0 + (ui32Interrupt / 32));
429  ui32IntPending &= (1 << (ui32Interrupt & 31));
430 
431  return ui32IntPending ? true : false;
432 }
#define ASSERT(expr)
Definition: debug.h:74
void IntPendSet ( uint32_t  ui32Interrupt)

Pends an interrupt.

The specified interrupt is pended in the interrupt controller. This will cause 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 will not be called until after the current interrupt handler has completed execution. The interrupt must have been enabled for it to be called.

Parameters
ui32Interruptspecifies the interrupt to be pended.
Returns
None
369 {
370  // Check the arguments.
371  ASSERT(ui32Interrupt < NUM_INTERRUPTS);
372 
373  // Determine the interrupt to pend.
374  if(ui32Interrupt == INT_NMI_FAULT)
375  {
376  // Pend the NMI interrupt.
377  HWREG(NVIC_INT_CTRL) |= NVIC_INT_CTRL_NMI_SET;
378  }
379  else if(ui32Interrupt == INT_PENDSV)
380  {
381  // Pend the PendSV interrupt.
382  HWREG(NVIC_INT_CTRL) |= NVIC_INT_CTRL_PEND_SV;
383  }
384  else if(ui32Interrupt == INT_SYSTICK)
385  {
386  // Pend the SysTick interrupt.
387  HWREG(NVIC_INT_CTRL) |= NVIC_INT_CTRL_PENDSTSET;
388  }
389  else if((ui32Interrupt >= 16) && (ui32Interrupt <= 47))
390  {
391  // Pend the general interrupt.
392  HWREG(NVIC_PEND0) = 1 << (ui32Interrupt - 16);
393  }
394  else if(ui32Interrupt >= 48)
395  {
396  // Pend the general interrupt.
397  HWREG(NVIC_PEND1) = 1 << (ui32Interrupt - 48);
398  }
399 }
#define ASSERT(expr)
Definition: debug.h:74
int32_t IntPriorityGet ( uint32_t  ui32Interrupt)

Gets the priority of an interrupt.

This function gets the priority of an interrupt.

Parameters
ui32Interruptspecifies the interrupt in question.
Returns
Returns the interrupt priority:
265 {
266  // Check the arguments.
267  ASSERT((ui32Interrupt >= 4) && (ui32Interrupt < NUM_INTERRUPTS));
268 
269  // Return the interrupt priority.
270  return((HWREG(g_pui32Regs[ui32Interrupt >> 2]) >> (8 * (ui32Interrupt & 3))) &
271  0xFF);
272 }
static const uint32_t g_pui32Regs[]
Definition: interrupt.c:91
#define ASSERT(expr)
Definition: debug.h:74
uint32_t IntPriorityGroupingGet ( void  )

Gets the priority grouping of the interrupt controller.

This function returns the split between preemptable priority levels and subpriority levels in the interrupt priority specification.

Returns
Returns the number of bits of preemptable priority.
217 {
218  uint32_t ui32Loop, ui32Value;
219 
220  // Read the priority grouping.
221  ui32Value = HWREG(NVIC_APINT) & NVIC_APINT_PRIGROUP_M;
222 
223  // Loop through the priority grouping values.
224  for(ui32Loop = 0; ui32Loop < NUM_PRIORITY; ui32Loop++)
225  {
226  // Stop looping if this value matches.
227  if(ui32Value == g_pui32Priority[ui32Loop])
228  {
229  break;
230  }
231  }
232 
233  // Return the number of priority bits.
234  return(ui32Loop);
235 }
static const uint32_t g_pui32Priority[]
Definition: interrupt.c:78
void IntPriorityGroupingSet ( uint32_t  ui32Bits)

Sets the priority grouping of the interrupt controller.

This function specifies the split between preemptable priority levels and subpriority levels in the interrupt priority specification. The range of the grouping values are dependent upon the hardware implementation; on the CC26xx family, three bits are available for hardware interrupt prioritization and therefore priority grouping values of three through seven have the same effect.

Parameters
ui32Bitsspecifies the number of bits of preemptable priority.
Returns
None
202 {
203  // Check the arguments.
204  ASSERT(ui32Bits < NUM_PRIORITY);
205 
206  // Set the priority grouping.
207  HWREG(NVIC_APINT) = NVIC_APINT_VECTKEY | g_pui32Priority[ui32Bits];
208 }
#define ASSERT(expr)
Definition: debug.h:74
static const uint32_t g_pui32Priority[]
Definition: interrupt.c:78
static uint32_t IntPriorityMaskGet ( void  )
inlinestatic

Gets the priority masking level.

This function gets the current setting of the interrupt priority masking level. The value returned is the priority level such that all interrupts of that and lesser priority are masked. A value of 0 means that priority masking is disabled.

Smaller numbers correspond to higher interrupt priorities. So for example a priority level mask of 4 will allow interrupts of priority level 0-3, and interrupts with a numerical priority of 4 and greater will be blocked.

The hardware priority mechanism will only look at the upper N bits of the priority level (where N is 3 for the CC26xx family), so any prioritization must be performed in those bits.

Returns
Returns the value of the interrupt priority level mask.
431 {
432  return(CPUbasepriGet());
433 }
uint32_t CPUbasepriGet(void)
Get the interrupt priority disable level.
Definition: cpu.c:277

Here is the call graph for this function:

static void IntPriorityMaskSet ( uint32_t  ui32PriorityMask)
inlinestatic

Sets the priority masking level.

This function sets the interrupt priority masking level so that all interrupts at the specified or lesser priority level are masked. This can be used to globally disable a set of interrupts with priority below a predetermined threshold. A value of 0 disables priority masking.

Smaller numbers correspond to higher interrupt priorities. So for example a priority level mask of 4 will allow interrupts of priority level 0-3, and interrupts with a numerical priority of 4 and greater will be blocked.

The hardware priority mechanism will only look at the upper N bits of the priority level (where N is 3 for the CC26xx family), so any prioritization must be performed in those bits.

Parameters
ui32PriorityMaskis the priority level that will be masked.
Returns
None.
405 {
406  CPUbasepriSet(ui32PriorityMask);
407 }
static void CPUbasepriSet(uint32_t ui32NewBasepri)
Update the interrupt priority disable level.
Definition: cpu.h:287

Here is the call graph for this function:

void IntPrioritySet ( uint32_t  ui32Interrupt,
uint8_t  ui8Priority 
)

Sets the priority of an interrupt.

This function is used to set the priority of an interrupt. When multiple interrupts are asserted simultaneously, the ones with the highest priority are processed before the lower priority interrupts. Smaller numbers correspond to higher interrupt priorities; priority 0 is the highest interrupt priority.

The hardware priority mechanism will only look at the upper N bits of the priority level (where N is 3 for cc26xx), so any prioritization must be performed in those bits. The remaining bits can be used to sub-prioritize the interrupt sources, and may be used by the hardware priority mechanism on a future part. This arrangement allows priorities to migrate to different NVIC implementations without changing the gross prioritization of the interrupts.

Parameters
ui32Interruptspecifies the interrupt in question.
ui8Priorityspecifies the priority of the interrupt.
Returns
None
244 {
245  uint32_t ui32Temp;
246 
247  // Check the arguments.
248  ASSERT((ui32Interrupt >= 4) && (ui32Interrupt < NUM_INTERRUPTS));
249  ASSERT(ui8Priority <= INT_PRI_LEVEL7);
250 
251  // Set the interrupt priority.
252  ui32Temp = HWREG(g_pui32Regs[ui32Interrupt >> 2]);
253  ui32Temp &= ~(0xFF << (8 * (ui32Interrupt & 3)));
254  ui32Temp |= ui8Priority << (8 * (ui32Interrupt & 3));
255  HWREG(g_pui32Regs[ui32Interrupt >> 2]) = ui32Temp;
256 }
static const uint32_t g_pui32Regs[]
Definition: interrupt.c:91
#define INT_PRI_LEVEL7
Definition: interrupt.h:115
#define ASSERT(expr)
Definition: debug.h:74
void IntRegister ( uint32_t  ui32Interrupt,
void(*)(void)  pfnHandler 
)

Registers a function to be called when an interrupt occurs.

This function is used to specify the handler function to be called when the given interrupt is asserted to the processor. When the interrupt occurs, if it is enabled (via IntEnable()), the handler function will be called in interrupt context. Since the handler function can preempt other code, care must be taken to protect memory or peripherals that are accessed by the handler and other non-handler code.

Note
The use of this function (directly or indirectly via a peripheral driver interrupt register function) moves the interrupt vector table from flash to SRAM. Therefore, care must be taken when linking the application to ensure that the SRAM vector table is located at the beginning of SRAM; otherwise NVIC will not look in the correct portion of memory for the vector table (it requires the vector table be on a 1 kB memory alignment). Normally, the SRAM vector table is so placed via the use of linker scripts.
Parameters
ui32Interruptspecifies the interrupt in question.
pfnHandleris a pointer to the function to be called.
Returns
None.

Referenced by CRYPTOIntRegister(), FlashIntRegister(), I2CIntRegister(), I2SIntRegister(), IOCIntRegister(), SSIIntRegister(), SysTickIntRegister(), TimerIntRegister(), TRNGIntRegister(), UARTIntRegister(), uDMAIntRegister(), and WatchdogIntRegister().

151 {
152  uint32_t ui32Idx, ui32Value;
153 
154  // Check the arguments.
155  ASSERT(ui32Interrupt < NUM_INTERRUPTS);
156 
157  // Make sure that the RAM vector table is correctly aligned.
158  ASSERT(((uint32_t)g_pfnRAMVectors & 0x000000ff) == 0);
159 
160  // See if the RAM vector table has been initialized.
161  if(HWREG(NVIC_VTABLE) != (uint32_t)g_pfnRAMVectors)
162  {
163  // Copy the vector table from the beginning of FLASH to the RAM vector
164  // table.
165  ui32Value = HWREG(NVIC_VTABLE);
166  for(ui32Idx = 0; ui32Idx < NUM_INTERRUPTS; ui32Idx++)
167  {
168  g_pfnRAMVectors[ui32Idx] = (void (*)(void))HWREG((ui32Idx * 4) +
169  ui32Value);
170  }
171 
172  // Point NVIC at the RAM vector table.
173  HWREG(NVIC_VTABLE) = (uint32_t)g_pfnRAMVectors;
174  }
175 
176  // Save the interrupt handler.
177  g_pfnRAMVectors[ui32Interrupt] = pfnHandler;
178 }
void(* g_pfnRAMVectors[NUM_INTERRUPTS])(void)
Definition: interrupt.c:135
#define ASSERT(expr)
Definition: debug.h:74
void IntUnregister ( uint32_t  ui32Interrupt)

Unregisters the function to be called when an interrupt occurs.

This function is used to indicate that no handler should be called when the given interrupt is asserted to the processor. The interrupt source will be automatically disabled (via IntDisable()) if necessary.

Parameters
ui32Interruptspecifies the interrupt in question.
Returns
None.
See also
IntRegister() for important information about registering interrupt handlers.

Referenced by CRYPTOIntUnregister(), FlashIntUnregister(), I2CIntUnregister(), I2SIntUnregister(), IOCIntUnregister(), SSIIntUnregister(), SysTickIntUnregister(), TimerIntUnregister(), TRNGIntUnregister(), UARTIntUnregister(), uDMAIntUnregister(), and WatchdogIntUnregister().

187 {
188  // Check the arguments.
189  ASSERT(ui32Interrupt < NUM_INTERRUPTS);
190 
191  // Reset the interrupt handler.
192  g_pfnRAMVectors[ui32Interrupt] = IntDefaultHandler;
193 }
void(* g_pfnRAMVectors[NUM_INTERRUPTS])(void)
Definition: interrupt.c:135
#define ASSERT(expr)
Definition: debug.h:74
static void IntDefaultHandler(void)
The default interrupt handler.
Definition: interrupt.c:111

Here is the call graph for this function:

Macro Definition Documentation

#define INT_PRI_LEVEL0   0x00000000
#define INT_PRI_LEVEL1   0x00000020
#define INT_PRI_LEVEL2   0x00000040
#define INT_PRI_LEVEL3   0x00000060
#define INT_PRI_LEVEL4   0x00000080
#define INT_PRI_LEVEL5   0x000000A0
#define INT_PRI_LEVEL6   0x000000C0
#define INT_PRI_LEVEL7   0x000000E0

Referenced by IntPrioritySet().

#define INT_PRIORITY_MASK   0x000000E0