Software interrupts

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Software interrupts

Jump to solution
2,247 Views
algernonarbuthn
Contributor II

Using the MCUXpresso SDK with i.MX6UL, I need to implement software interrupt handlers.

i.MX6UL implements the ARM GIC. My attempt at using Software0_IRQn is:

Install handler for Software interrupt 0:

  SystemInstallIrqHandler( Software0_IRQn, <handler>, 0 );
  GIC_SetPriority( Software0_IRQn, <priority>);
  GIC_EnableIRQ( Software0_IRQn );

Invoke handler by calling this function:

static void GIC_software_interrupt( IRQn_Type IRQn )
{
  GIC_Type *gic = ( GIC_Type* )( __get_CBAR() & 0xFFFF0000UL );

  // Invoke IRQn on this processor.

  gic->D_SGIR = ( 2 << 24 ) | ( uint32_t )IRQn;

}

This doesn't work. The handler is never called. Anyone know what I'm doing wrong?

0 Kudos
Reply
1 Solution
1,913 Views
algernonarbuthn
Contributor II

Actually, this does work. I had an interrupt priority issue.

View solution in original post

0 Kudos
Reply
1 Reply
1,914 Views
algernonarbuthn
Contributor II

Actually, this does work. I had an interrupt priority issue.

0 Kudos
Reply