J
jwei
i am using an AT91RM9200 with win ce 5.0 and .net cf 2.0
using the following sample programm i try to send some chars over a serial
connection to the board with hyperterminal, but the key entered in
hyperterminal gets displayed (= DataReceived event fired) not until about
8sec ?!?
i debugged the serial driver also, and the AT91SERIAL_RxIntr gets called not
until 8sec too ... ?
any ideas ?
class Program {
static void Main(string[] args) {
SerialPort sp = new SerialPort("COM1", 9600, Parity.None, 8,
StopBits.One);
sp.Handshake = Handshake.None;
try {
sp.Open();
sp.DataReceived += new
SerialDataReceivedEventHandler(sp_DataReceived);
Thread.Sleep(Timeout.Infinite);
} catch (Exception ex) {
Console.WriteLine(ex.Message);
}
}
static void sp_DataReceived(object sender,
SerialDataReceivedEventArgs e) {
SerialPort sp = (SerialPort)sender;
try {
string s = sp.ReadExisting();
Console.WriteLine(s);
} catch (Exception ex) {
Console.WriteLine(ex.Message);
}
}
}
using the following sample programm i try to send some chars over a serial
connection to the board with hyperterminal, but the key entered in
hyperterminal gets displayed (= DataReceived event fired) not until about
8sec ?!?
i debugged the serial driver also, and the AT91SERIAL_RxIntr gets called not
until 8sec too ... ?
any ideas ?
class Program {
static void Main(string[] args) {
SerialPort sp = new SerialPort("COM1", 9600, Parity.None, 8,
StopBits.One);
sp.Handshake = Handshake.None;
try {
sp.Open();
sp.DataReceived += new
SerialDataReceivedEventHandler(sp_DataReceived);
Thread.Sleep(Timeout.Infinite);
} catch (Exception ex) {
Console.WriteLine(ex.Message);
}
}
static void sp_DataReceived(object sender,
SerialDataReceivedEventArgs e) {
SerialPort sp = (SerialPort)sender;
try {
string s = sp.ReadExisting();
Console.WriteLine(s);
} catch (Exception ex) {
Console.WriteLine(ex.Message);
}
}
}