Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Valued Contributor III
681 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
Highlighted
Valued Contributor III
2 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.

0 Kudos
Highlighted
Valued Contributor III
2 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 ?
0 Kudos
Highlighted
Valued Contributor III
2 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.
0 Kudos