Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12600 Discussions

NiosII interuppts mamagement

Altera_Forum
Honored Contributor II
1,015 Views

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 II
336 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
Altera_Forum
Honored Contributor II
336 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
Altera_Forum
Honored Contributor II
336 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
Reply