facing Problem while writing UART driver

Jun 27, 2006 4 Replies

hi. I am writing the keyboard driver (using the UART and RS232 protocol). There is an Receive Fifo And one Flag register.when there is an data in receiver fifo the Flag get changed. i am reding the reading the receiver fifo depend on the Flag register (if the receive flag set).but on debugger when i see the Flag register the Flags are not changing? for example : "when the flag which tell there is data in Rx fifo set and then when i do the read operation this flag should get cleared" but it is not getting cleared..



need ur help as soon as possible Thanks



Hi Rahul,

Please give a code sample and some information on what chip you are using, and what debugger etc.

Ross

hi ross

the program goes like this

while(1) { while ((HOSTSYNC & 0x00000001) != 0x00000001); /* keyboard is connected

*/

for(i=1;i > hi.

In addition to what others posted, make sure all the control registers are declared with the "volatile" modifier. Otherwise you code may not read the actual register value when you expect it.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required