📄 readme.txt
字号:
Windows CE .NET VoyagerGX Serial driver information
===================================================
Introduction
------------
Silicon Motion, Inc. VoyagerGX Serial Driver is architected to support
16750 model UART device, where it has 64 bytes FIFO depth.
And it supports the following Baud Rate:
- 50 bps - 1200 bps - 9600 bps - 57600 bps
- 75 bps - 1800 bps - 12800 bps - 115200 bps
- 110 bps - 2000 bps - 14400 bps - 128000 bps
- 135 bps - 2400 bps - 19200 bps - 256000 bps
- 150 bps - 3600 bps - 23040 bps
- 300 bps - 4800 bps - 28800 bps
- 600 bps - 7200 bps - 38400 bps
Supported Windows CE Version
----------------------------
Only Windows CE version 4.10 and up are supported.
Setup
-----
VoyagerGX serial driver initial setup information for Windows CE .NET:
* Copy serial driver source codes or binary dll file to
"$(_WINCEROOT)\public\common\oak\DRIVERS\SERIAL" directory
Where $(_WINCEROOT) is the installation location of the Windows CE .NET,
such as C:\WINCE410. For source codes use, please note that SMI Serial driver
has 5 subdirectories called COM_SMI, SER_SMI, MDD_SMI, ISR_SMI, and SMI_INC
(Include files for SMI VoyagerGX Serial driver). For binary only use, copy
comSMI.dll to COM_SMI directory and isrSMI.dll to ISR_SMI directory (the others
directories are not needed).
* Modify "$(_WINCEROOT)\public\common\oak\DRIVERS\SERIAL\dirs" file to include the
following directories path:
mdd_smi \
ser_smi \
isr_smi \
com_smi
* Import VoyagerGX serial driver feature to Catalog, as follows:
- Click on File\Manage Catalog Features.
- Remove any older smivgxser.cec file from the list, if any.
- Click Import and get the smivgxser.cec from the Serial directory above.
- Click Refresh, if necessary.
* Include VoyagerGX serial driver to the platform, as follows:
- Find any SMI serial driver instances on the FeatureView of Platform builder
and remove all of them.
- Drag Catalog\Device Drivers\Serial\SMI VGX COM feature to the FeatureView
* Change the VoyagerGX Windows CE registry settings
- The registry is used to provide information to the driver, such as assigning
the Index number of SMI VGX COM Port, FIFOs trigger level, etc...
- Click on "Parameters" tab, edit common.reg (or any .reg files, as preferred)
- Add the following lines, and specify the registry options (See Registry Settings
section):
; To use the first device driver instance, add the following registry setting
IF BSP_SERIAL_SMI
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\SMIVGXSerial]
; Required entry
"DeviceArrayIndex"=dword:{any number}
"Prefix"="COM"
"Dll"="COMSMI.Dll"
"Index"=dword:{any number}
"UARTIndex"=dword:{0,1}
; Specify any other VoyagerGX registry options below here
ENDIF
; To use the second device driver instance, add the following registry setting
IF BSP_SERIAL_SMI_2
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\SMIVGXSerial2]
; Required entry
"DeviceArrayIndex"=dword:{any number}
"Prefix"="COM"
"Dll"="COMSMI.Dll"
"Index"=dword:{any number}
"UARTIndex"=dword:{0,1}
; Specify any other VoyagerGX registry options below here
ENDIF
~ Besides the above registry entries, some systems required more entry such as the following:
> For HOST INTERFACE, also add these entries:
"Irq"=dword:26
"SysIntr"=dword:26
"RegBase"=dword:13E00000
- Please note that the above entry is required in order for the serial driver to
work properly
* The definitions of the required entry:
- DeviceArrayIndex: The Device Index of the particular driver. Typically, the
deviceArrayIndex is used to select from different device classes, but
will not necesarrily vary for different instances of the same device type.
In other words, it allows multiple PDDs to be linked with a single MDD
creating a multiport driver.
However, since this particular driver only supports the serial device, therefore
it does not required a certain number to be assigned to it. User can assign
any number to this entry.
- Prefix: The name to access the driver. In this driver, this entry has to be named "COM".
- Dll: This is the driver module name.
- Index: The index number of the serial driver. The prefix and the index combined will create
the device name ([prefix][index], e.g: COM5).
- UARTIndex: The index number of the SMI UART, either to use UART0 or UART1.
- Irq: Interrupt number that is assigned for the hardware. In PCI device, the device driver will
automatically look for the IRQ number from the PCI configuration space register.
- SysIntr: Interrupt number assigned by the system (usually for the sharing purpose). For HOST
interface configuration, we need to specify the same number as the IRQ since in HOST
interface configuration, each module will have its own dedicated Interrupt number.
- RegBase: VoyagerGX physical register base address.
* No need to add comsmi.dll module info to .BIB files, it is already included by
smivgxser.cec
* Build the VoyagerGX serial driver
- To build the whole platform, click Build\Build Platform or Build\Rebuild Platform
- To rebuild the serial driver separately, right click on SMI VGX COM and
select "Build Selected Features" and then click Build\MakeImg
Registry Settings
-----------------
Registry Settings enable/disable any feature inside the serial driver when it first loads up
(See Setup section on how to specify them).
* The optional registry format is as follows:
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\SMIVGXSerial(2)]
"Order"=dword:{0,1,2,3,4,5}
"InternalLoopBack"=dword:{0, 1}
"RxTriggerLevel"=dword:{0,10,20,3E}
* The definitions are:
- Order: This is the loading priority among any other drivers under the HKLM\Drivers\BuiltIn.
There are only 6 possible values, i.e. any values less than 6. Please note that in some
system, setting the order to 0 might fail the driver.
- InternalLoopBack: Enable internal loopback within the chip (for debugging and
testing purpose).
If not specified, InternalLoopBack is defaulted to 0 (Normal use).
- RxTriggerLevel: The receive FIFO threshold level where a receive data interrupt
is generated once the data in the receive FIFO reached the level value. The
supported receive FIFO trigger level are also 0x00 (0 byte/empty), 0x10 (16 bytes),
0x20 (32 bytes), and 0x3E (62 bytes).
If not specified, RxTriggerLevel is defaulted to half the FIFO, i.e. 0x20.
Errata
------
* The current Voyager GX Serial device does not work properly with the standard serial device
due to discrepancy in baud rate generator clock where SMI clock can not get the actual baud rate.
* Voyager Gx can only supports some of the baud rate up to 38400 bps to communicate with the standard
serial device.
* SMI Voyager GX uses 8 MHz baud rate generator clock which is generated from dividing 96 MHz PLL 0 by 12.
* This table below provide the calculation of the actual baud rate generated by SMI Serial Device
using the following formula:
Desired Baud Rate = fClock / (16 * Divisor Value)
where:
fClock = 8 Mhz (default SMI Voyager GX baud rate generator clock)
Divisor Value = integer number between 2 to 65535.
NOTE: Unlike the original serial device, division by 1 generates a BAUD signal that is
constantly high.
==========================================================================
| Desired Baud Rate | Divisor Value | Actual Baud Rate | Difference |
| (bps) | | to the nearest | to the nearest |
| | | integer | integer |
| | | (bps) | (bps) |
==========================================================================
| 50 | 10000 | 50 | - |
| 75 | 6667 | 75 | - |
| 110 | 4545 | 110 | - |
| 135 | 3713 | 135 | - |
| 150 | 3333 | 150 | - |
| 300 | 1667 | 300 | - |
| 600 | 833 | 600 | - |
| 1200 | 417 | 1199 | 1 |
| 1800 | 277 | 1805 | 5 |
| 2000 | 250 | 2000 | - |
| 2400 | 208 | 2403 | 3 |
| 3600 | 139 | 3597 | 3 |
| 4800 | 104 | 4808 | 8 |
| 7200 | 69 | 7246 | 46 |
| 9600 | 52 | 9615 | 15 |
| 12800 | 39 | 12821 | 21 |
| 14400 | 35 | 14286 | 114 |
| 19200 | 26 | 19231 | 31 |
| 23040 | 22 | 22727 | 313 |
| 28800 | 17 | 29412 | 612 |
| 38400 | 13 | 38462 | 62 |
| 57600 | 9 | 55556 | 2044 |
| 115200 | 4 | 125000 | 9800 |
| 128000 | 4 | 125000 | 3000 |
| 256000 | 2 | 250000 | 6000 |
==========================================================================
* There is an alternative solution to fix this problem, i.e., by changing the 12 Mhz or 24 Mhz
crystal to other value that can support the desired baud rate. However, this might
cause the other modules in the Voyager GX to be unusable, such as USB.
Formula to find the serial fClock:
Crystal Value * 4
fClock = ----------------- where 4 and 12 are fixed values.
12
If this solution is desired, please also change the divisor value in the BaudTable in the comSMI.c
according to the clock that is used.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -