Software interrupts

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Software interrupts

跳至解决方案
2,931 次查看
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 项奖励
回复
1 解答
2,597 次查看
algernonarbuthn
Contributor II

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

在原帖中查看解决方案

0 项奖励
回复
1 回复
2,598 次查看
algernonarbuthn
Contributor II

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

0 项奖励
回复