Dear All, My requirement is: If a particular byte is received thro UART0, I have to do some action which will take more than 500 ms. I cant do those actions in the ISR itself as it takes a long time.So I wrote a function to do those actions and call it from the ISR when the particular byte is received. My problem is that particular byte may be received second time before those actions get finished for the particular byte received for the first time. so it makes the UART0 ISR as recursive. Does it cause any problem? Any other suggestions to solve the problem? Note: 1) Those actions may use the UART0 2) I cant do polling.
I cant do those actions in the ISR itself as it takes a long time.So I wrote a function to do those actions and call it from the ISR That was exactly not the way to solve that problem. Calling a function from the ISR makes no difference to doing all that function's work directly in the ISR. What you have to do is delegate that work to code completely *outside* the ISR. I.e. it has to be done by the main loop.
What you have to do is delegate that work to code completely *outside* the ISR. I.e. it has to be done by the main loop. If I want to do it in the main loop, i've to do polling. but I cant go for polling. B'cos this is only a 10% of my code. Strictly I cant use polling.
If I want to do it in the main loop, i've to do polling NO Do a search on "circular buffer", that will get you going. Erik
http://www.keil.com/download/docs/200.asp