Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
17 years ago

handling 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's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored 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.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored 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's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    You'll find functions in the HAL to install one of your own functions as interrupt handler.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored 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!