Page 1 of 1
2440 baudrate problems
Posted: Thu Mar 04, 2010 8:29 am
by DTronix
Hi,
For some reason i can't find out, the baudrate of the UARTs is wrong, i've tested a SerialTest app included on the WinCE 5.0 and the byte lenght in milli-Seconds is higher than it should be (measured with a digital oscilloscope), this means that the real output baudrate is lower than the one i really choose.
I thought it might be this demo software working wrong, so i made my own in VB.net , but i have the exactly same problem.
To comunicate with other devices at "9600 Bauds" i must set "12902" in my baudrate property.
Code: Select all
SerialPort.BaudRate = 12902 'Instead of 9600
This problems is independet of the uart, if i choose COM2 or COM3 the problem persists.
I really need to solve this problem asap.
Thanks
Re: 2440 baudrate problems
Posted: Thu Mar 04, 2010 9:20 am
by nicolas
are you using a a usb-serial adapter on the pc side ?
Re: 2440 baudrate problems
Posted: Thu Mar 04, 2010 10:24 am
by DTronix
No i'm connecting the board directly to the device.
The problem exist even with nothing connected to. I'm measeuring the output signal with the oscilloscope in the uart pins and the 10bits of the signal are longer than it should be.
At 9600 bauds, a bit should be 104uS, and i measure 140uS. I've tested all the baudrates and all were wrong.
To solve this i used a higher baudrate (12900) but i don't like it at all.
Thanks
Re: 2440 baudrate problems
Posted: Thu Mar 04, 2010 2:27 pm
by nicolas
using flowcontrol ?
not sure what else to tell you but that in all my tests its worked fine.
The only case where you may see weird issues was when using KITL and the first uart, but not in speed but in ability tochange speed. havent seen any reports of the issues you are having.
i assume youve tested your oscilloscope against a pc or other to make sure its timing properly ?
Re: 2440 baudrate problems
Posted: Thu Mar 04, 2010 6:37 pm
by DTronix
I've measured other devices to be sure, but the problem appears when i tryed to connect the board with a HID CardReader that i knew it was working fine because it was connected to my pc first.
I've have 2 more boards, one with winCE that it's at my clients office, i guess that will be back next week, so i'll be testing in that one.
The last one has linux and i couldn't find any software to test it.
I guess the problem is the WinCe, because the debug uart at 115200 bauds works fine.
Thanks anyway
Re: 2440 baudrate problems
Posted: Wed Mar 31, 2010 4:41 am
by pub20
To get serial port work correctly under CE (c++ application) you have to fill on the DCB structure
Re: 2440 baudrate problems
Posted: Wed Mar 31, 2010 7:04 am
by DTronix
Thanks for the help, but the problem was solved, the WinCe image for the 3.5" LCD was wrong. We had to set correctly the clock for the peripherals and everything works fine now.
Thanks anyway.