Help needed!!interrupt handling in microblaze system

hello,

I have a microblaze system with a uart and a timer (both produce interrupt).The interrupts are handled by intc.Uart interrupt is the highest priority followed by timer interrupt.

  1. can microblaze read only the required data from the uart at a time.like say i want to get a frame from uart i.e data from one flag to

another flag and then stop reading the bytes fro uart.When i tried doing this i realised that I have to read the whole file that i am transferring from the hyperterminal to the uart.but i dont want this to

happen.any suggestions?

  1. if the above behavior is not possible then i can send just one frame

at a time to uart from the hyperterminal.if i do this the what happens is that my timer is also running at the same time.when it expires it interrupts the microblaze.But now if i send a frame to uart,it interrupts microblaze and then i stop getting interrupts from the timer.if i send another file (data) from hyperterminal to uart,it interrupts the microblaze properly but the timer has stopped working or otherwise its interrupt is not getting recognised. I thought that probably when i am in the uart_int_handler probably my timer interrupt was genearted and it was missed since i was in int. routine.Is this a possibility.?is yes ,how can i avoid this?I want to service the timer interrupt after i return fro the uart handler.my intc

driver does not have XIN_SVC_ALL_ISRS_OPTION defined.so it does not allow me to use it in the code. Please share some information regarding this problem. Thank you all.

Reply to
fpga00
Loading thread data ...

The interrupt from uartlite is set when Receive FIFO goes from empty to non-empty. If you are not emptying the FIFO in your interrupt handler, you will not get any more receive interrupt.

Timer interrupts and uart interrupts can of course be handled at the same time. The interrupt controller will keep track on what interrupts are active. You have to clear the interrupts serviced in your interrupt handler. EDK includes a default interrupt handler where you attach normal C function to handle each interrupt. More of this can be found in the documentation.

Göran Bilski

Reply to
Göran Bilski

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.