Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
714 Views

NiosII interuppts mamagement

Hello guys... 

 

I have a NiosII based system which has to communicate with a master peripheral with the UART protocol. So I've configured it using software interrupt. 

 

On my board I have also a gps module. This module uses the UART protocol to stream its informations. Now I want to read its informations using interrupt but I think that there is the possibility to loose information when I'm processing an interrupt and another one is generated... 

 

How could I mange it ? Any suggestions ?? 

 

Thank tou and ahave a nice day !
0 Kudos
3 Replies
Altera_Forum
Honored Contributor I
35 Views

Another interrupt can be processed only if it has higher priority. So you can try to define priorities in a way this doesn't happen.

Altera_Forum
Honored Contributor I
35 Views

 

--- Quote Start ---  

Another interrupt can be processed only if it has higher priority. So you can try to define priorities in a way this doesn't happen. 

--- Quote End ---  

 

 

Ty Chris, 

 

But what happens if I'm processing interrupt_1 and then arrives two interrupt_2 ? 

 

I will miss the first interrupt_2 rx data ?
Altera_Forum
Honored Contributor I
35 Views

If interrupt_2 has a lower priority and can't be serviced immediately, anyhow it gets latched by the irq controller and the isr will start when no other higher priority irq is active. 

You could lose rx data only if the delay caused by other isr exceeds the time between two rx events. However if your uart has a rx FIFO, you can allow a much longer delay.
Reply