Forum Discussion
Altera_Forum
Honored Contributor
17 years agohandling interruptions!
hi,
how I can command a slave processor by another master processor using interruption: for example, the master processor can stop the slave processor. otherwise the slave processor awaits a signal from the master to become active. i can do this with NIOSII processor? can someone help me?? tks for all members.5 Replies
- Altera_Forum
Honored Contributor
You must write your own function and register it with alt_irq_register(). You don't need to edit the system library. Have a look at the alt_irq functions in the hal api (http://www.altera.com/literature/hb/nios2/n2sw_nii52010.pdf) reference.
- Altera_Forum
Honored Contributor
Hi,
thank you Daixiwen for help. I found functions in the HAL. I had a look also to files generated by the NIOS II IDE in "hello_world_3_syslib" and I found this file:"alt_irq_handler.o". What I understood is that the compiled default file which is handling interruptions is "alt_irq_handler.c" and if I wanted to write IRQ code, it should be there and not by creating my own function as interrupt handler. Isn't it? Am I in the right way of thinking? If I am, in my situation, I cannot change this file to see the result, because I am not in administrator session. What can I do? Thanks a lot! - Altera_Forum
Honored Contributor
You'll find functions in the HAL to install one of your own functions as interrupt handler.
- Altera_Forum
Honored Contributor
Hi,
I am trying to do an interruption at the execution of a program in C language. On SOPC Builder I a created a user_logic bloc with an irq output so that a niosII processor can react on this interruption. My problem is how and where can I add instructions (in C language) to do when this interruption occurs? Thanks for all help! - Altera_Forum
Honored Contributor
Have a look at the multiprocessor components in SOPC builder. If I remember correctly you have a mutex and a message box that can be used for that.