AnsweredAssumed Answered

Software interrupts

Question asked by Bill Webster on Jul 30, 2017
Latest reply on Jul 30, 2017 by Bill Webster

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?

Outcomes