AT91M55800 UART interrupt + pdc, empty buffer

I`m using AT91EB55 eval board. My interrupts rutines are based on functions which simply configure software buffers in order to store(by PDC) there data from uart. If I put this functions(send_pdc(char

*out_buff, int length) and recieve_pdc(char *in_buff, int length) ) into main function and send and receive some data then it works propertly but if i use receive function as a part of uart interrupt routine then I get no data in input buffer. Is it possible that uart buffer is being cleared after specific time(interrupt latency) or after some event occured ??

Regards

Reply to
dik
Loading thread data ...

No the uart buffer is not automatically cleared by time. I would expect a problem in your receive function. You might explain "PDC". Is your buffer a global array? Could it be local and being lost by the change in stacks from normal to interrupt mode?

--
Scott
Validated Software Corp.
Reply to
Not Really Me

You cant use a recieve function, that you can call, as part of the uart interrupt because that would imply that your program was determining when data arrives which of course it cant, Generally your recive interrupt should store the data somewhere (a buffer), ready the uart/interrupt system for the next byte and return. You can then use a recive function to retrieve the data from the buffer. You should do a similar thing with the transmitter (although this is not so critical) write your transmit data to a buffer and let the transmitter interrupt send it out.

Reply to
cbarn24050

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.