hello everybody !
I look forward to your help !
The development environment : Quartus II 13.1 (64-bit);
Eclipse IDE for C/C++ Developers(Version: Indigo Service Release 2)
FPGA model :EP4CE75U19I7N
The following code:
// printf("Hello from Nios II-3-1!\n");
alt_irq_register(DEVICECTRL_0_IRQ, NULL,Button_Irq_Handler); //1906 line
// printf("Hello from Nios II-3-2!\n");
set_tr_type(0); //End data transfer
printf("Hello from Nios II-3-3!\n");
calling alt_irq_register.c :
int alt_irq_register (alt_u32 id,
int rc = -EINVAL;
if (id < ALT_NIRQ)
* interrupts are disabled while the handler tables are updated to ensure
* that an interrupt doesn't occur while the tables are in an inconsistant
status = alt_irq_disable_all ();
alt_irq[id].handler = handler;
alt_irq[id].context = context;
rc = (handler) ? alt_irq_enable (id): alt_irq_disable (id); //95 line
static ALT_INLINE void ALT_ALWAYS_INLINE
alt_irq_enable_all (alt_irq_context context)
#if (NIOS2_NUM_OF_SHADOW_REG_SETS > 0) || (defined NIOS2_EIC_PRESENT) || \
(defined NIOS2_MMU_PRESENT) || (defined NIOS2_MPU_PRESENT)
status &= ~NIOS2_STATUS_PIE_MSK;
status |= (context & NIOS2_STATUS_PIE_MSK);
NIOS2_WRITE_STATUS (context); // The debug program stops here
Thanks in advance.
Thank you for posting in Intel community forum and hope you are doing well.
Further clarification, do you mind explaining more on what do you mean by normal?
Also do you see any error or warning upon compiling?
Looking on the code that you have, I am suspecting there might be something off with the way the alt_irq_register are invoked, maybe the parameters.
Possible for you to share your quartus project for us to look into further more?
Note: for the time being here is a different design example which make use of HAL api reference here and you can have a look at it. (download the example 'an459-design-files.zip', it is based on the following guideline)
Hope this message find you well and good day, as we do not receive any response from you to the previous clarification that we have provided. Please post a response in the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support. The community users will be able to help you with your follow-up questions.