altera soc FPGA一侧的外设无法触发HPS中断
时间:10-02
整理:3721RD
点击:
裸跑的程序,已经测试成功HPS自己的定时器的中断,在定时器的基础上,把定时器的中断号换成fpga外设的中断号,用的是
* Registers a callback for the specified secure interrupt for the CPU
* interface.
*
* This API only registers a callback for secure interrupts. If a callback is
* registered for a non-secure interrupt, the behaviour is undefined.
ALT_STATUS_CODE alt_int_isr_register(ALT_INT_INTERRUPT_t int_id,
alt_int_callback_t callback,
void * context);
这个函数,中断号已经对应FPGA的irq0,应该是72,
但是按下去按键后却无法触发中断,请教一下有人能给个帮助么?
* Registers a callback for the specified secure interrupt for the CPU
* interface.
*
* This API only registers a callback for secure interrupts. If a callback is
* registered for a non-secure interrupt, the behaviour is undefined.
ALT_STATUS_CODE alt_int_isr_register(ALT_INT_INTERRUPT_t int_id,
alt_int_callback_t callback,
void * context);
这个函数,中断号已经对应FPGA的irq0,应该是72,
但是按下去按键后却无法触发中断,请教一下有人能给个帮助么?
已经解决了,在qsys里面生成外围器件时,需要使能外围器件的中断寄存器
