Disabling and Enabling Global Interrupts

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Will the following two assembly commands work to disable and enable global Interrupts on the SAMA5D44?

 


asm("cpsie if");
asm("cpsid if");

I know they work for the SAM 7

 

If not what are the instructions to achieve this?

 

Thanks lads.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

have you read the compiler info? Usually these are __disable_irq() or something like that.

Last Edited: Sat. Aug 24, 2019 - 01:52 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

right lads.  I have the following code:

 

//------------------------------------------------------------------------------
//         Startup routine
//------------------------------------------------------------------------------

	.align      4
	.arm

/**
 * DISABLE INTERRUPTS
 */		
	cpsid if
	
/* Exception vectors
 *******************/
	.section    .vectors, "a", %progbits

resetVector:
/* Reset */
	ldr     pc, =resetHandler
/* Undefined Instruction */
	ldr     pc, =undefined_instruction_irq_handler
/* Software Interrupt */
	ldr     pc, =software_interrupt_irq_handler
/* Prefetch Abort */
	ldr     pc, =prefetch_abort_irq_handler
/* Data Abort */
	ldr     pc, =data_abort_irq_handler
/* Reserved for future use */
	.word   0
/* Interrupt */
	ldr     pc, =irqHandler
/* Fast interrupt */
	ldr     pc, =fiqHandler

	.section    .text

//------------------------------------------------------------------------------
/// Handles a fast interrupt request by branching to the address defined in the
/// AIC.
//------------------------------------------------------------------------------
fiqHandler:

	/* Inform RTOS that Interrupt has been entered */

	stmfd   sp!, {r0-r12, lr}
	bl		enter_irq
	ldmia   sp!, {r0-r12, lr}

 

Last Edited: Tue. Nov 5, 2019 - 12:28 AM