Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Serial Port problem

12 views
Skip to first unread message

sudheer

unread,
Jun 20, 2006, 5:16:10 PM6/20/06
to
Hi

I have a problem in serial port on WinCE 5.0.

It is showing the following error:
au1uart::HWInit - UnitIndex 3 is invalid

The registry settings for serial port are as follows:

; @CESYSGEN IF COREDLL_SERDEV
IF BSP_NOSERIAL !
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Serial3]
"Order"=dword:0
"UnitIndex"=dword:3
"DeviceArrayIndex"=dword:3
"Prefix"="COM"
"Index"=dword:3
"Dll"="au16550.dll"
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Serial3\Unimodem]
"Tsp"="Unimodem.dll"
"DeviceType"=dword:0
"FriendlyName"="Serial Cable on COM3:"
ENDIF BSP_NOSERIAL !
; @CESYSGEN ENDIF COREDLL_SERDEV

Can anyone please let me know why the above error occurs and any suggestions
to solve this problem. Is this any way related to make audio not work
properly? if yes, can you briefly explain how

Thanks in advance
With Regards
Sudheer


Luca Calligaris

unread,
Jun 20, 2006, 5:23:01 AM6/20/06
to
Take a look at pdd.c in your serial driver. You will find an array named
UartConfig which is filled with the serial ports on the board depending on
some #define:

static UART_CONFIG UartConfig[] = {
/*...*/
#ifdef UART3_PHYS_ADDR
{ UART3_PHYS_ADDR, HWINTR_UART3 },
#else
{ 0, 0 },
#endif
}

You are probably missing one of the ports: the debug msg is due to this check
( always in pdd.c ):

if (UnitIndex > UART_CONFIG_SIZE || UartConfig[UnitIndex].UartPhysAddr == 0)
{/*...*/}


Remember that you must enable UART0 and UART3 the 'sys_pinfunc' registry
in the kernel.

Tom Moon

unread,
Jun 20, 2006, 4:39:06 PM6/20/06
to
Where did you get the "UnitIndex" entry?
> [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Serial3]
> "UnitIndex"=dword:3

I cannot find out anything about this registry entry. Do you know what
it is for?
Try removing it and see what happens.

If you have more information about that registry entry, please post a
link. I'd like to know, too.

-J Tom Moon

sudheer

unread,
Jun 21, 2006, 5:58:04 PM6/21/06
to
Hi Tom

The following message is mentioned as a comment in the source code of serial
driver

"Table used to convert "UnitIndex" from registry into physical addresses and
IRQs."

and in the code flow they are using this UnitIndex for hardware
initialization of serial device.

So if that registry entry is commented then it is showing as
"unassigned/invalid" UnitIndex.
As Luca as pointed out (in the previous post) that there was a problem in
the assignment of serial port as there was no UART3_PHYS_ADDR in the device
as the device has UART0 and UART1 only.
Sorry, I dont have much information other than this.

Now I have assigned UnitIndex = 1 so that problem of serial port was fixed.

Thanks
with Regards
Sudheer


"Tom Moon" <jtm.moon....@gmail.com> wrote in message
news:1150835946....@c74g2000cwc.googlegroups.com...

sudheer

unread,
Jun 21, 2006, 6:10:35 PM6/21/06
to
Hi Luca Calligaris

Thank you very much for your reply. Actually, in my device i have UART0 and
UART1 only but not UART3.
So, I have assigned the UnitIndex = 1 for com1 and now that error message
has disappeared as physical address has been assigned (previously the
physcial address for UartConf[] was 0 when UnitIndex=3). The following are
the registry settings for serial device

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Serial1]
"Order"=dword:0
"UnitIndex"=dword:1
"DeviceArrayIndex"=dword:1
"Prefix"="COM"
"Index"=dword:1
"Dll"="au16550.dll"
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Serial1\Unimodem]


"Tsp"="Unimodem.dll"
"DeviceType"=dword:0

"FriendlyName"="Serial Cable on COM1:"

Thanks once again for your suggestion. I have one more doubt regarding this.
Actually PSC_I2S (audio) driver is using the same physical address
(UART1_PHYS_ADDR) as that of serial port. Is this any way effect the audio
to not work properly as both serial driver and audio driver using same UART
address? I am asking this question as my audio driver is not working. Please
let me know if you know any information regarding this

Thanks in advance
With best regards
Sudheer

"Luca Calligaris" <LucaCal...@discussions.microsoft.com> wrote in
message news:C105652B-1B80-468B...@microsoft.com...

0 new messages