引用: 引用 9 楼 g00glelin 的回复:
基本可以参照2440的串口驱动来做,因为本人只对2440的比较熟悉,呵呵,原理一样的。
看看你扩展的中断是否是外部中断。注册表部分改改,驱动部分主要就是三个方面,一个是初始化,一个是发送处理,一个是接收处理。
本人做过VK3224的扩展串口,这个芯片实在烂,一开始我也是想按PDD架构做的,发现很难实现,串口之间造成冲突,只能实现一个口。后来就采用简单流驱动解决了
多谢,我是用的外部中断,现在就是加载不了,于是加调试信息,发现问题如下
DeviceFolder::LoadDevice(Drivers\\BuiltIn\\Serial) last 30 TicksDEVICE!RegReadActivationValues RegQueryValueEx(Drivers\\BuiltIn\\Serial2\\BusPrefix) returned 2
DEVICE!RegReadActivationValues RegQueryValueEx(Notify\\BusPrefix) returned 2
--主要是下面,扩展了4个串口,4,5,6,7
DeviceFolder::LoadDevice(Drivers\\BuiltIn\\Serial2) last 30 TicksDEVICE!RegReadActivationValues RegQueryValueEx(Drivers\\BuiltIn\\Serial4\\BusPrefix) returned 2
ms_exsrial a init !--这是在最外层加的打印信息
CPdd16554 init ! -- 这是继承了Cpdd16550类的,开始初始化
CPdd16554 init ist set up!--这是建立完ist后的打印信息
--CPdd16550::Init()== TRUE 这个地方就出错了,没有初始化对
--注册表信息如下
--[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Serial4]
"Irq"=dword:22 ; 34 IRQ_AUART
"SysIntr"=dword:20 ; 32 SYSINTR_AUART
"MemBase"=dword:04001000 ; AUART Register
"MemLen"=dword:40
"DeviceArrayIndex"=dword:3 ; AUART object
"Prefix"="COM"
"IClass"="{CC5195AC-BA49-48a0-BE17-DF6D1B0173DD}"
"Dll"="ms2_exserial.dll"
"Order"=dword:0
--[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Serial4\Unimodem]
"Tsp"="Unimodem.dll"
"DeviceType"=dword:0
"FriendlyName"="Serial Cable on COM4:"
"DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00, 00,00, 08, 00, 00, 00,00,00,00
--下面还是接着的打印信息
ms_exsrial a init false!
udevice.exe $udevice_0003
FSDMGR!MountTable_t::RegisterVolumeName: Registered "$udevice_0003" at index 8APISCreateAPIHandle: pvData == NULL
FSDMGR!MountTable_t::RegisterVolume: Registered volume at index 8 (Name="$udevice_0003", MountFlags=0x101)Unknown: DEBUGCHK failed in file C:\\ymzki\\public\\COMMON\\oak\\drivers\\serial\\serpddcm\\.\\cserpdd.cpp at line 531
DEBUG_BREAK @c1036400 Ignored.
DEVICE!LaunchDevice: Init() failed for device 0xd00e60d0
DEVICE!I_ActivateDeviceEx: couldn't activate: prefix COM, index 3, dll ms2_exserial.dll, context 0xd23ae684
DeviceFolder::LoadDevice(Drivers\\BuiltIn\\Serial4) last 112 TicksDEVICE!RegReadActivationValues RegQueryValueEx(Drivers\\BuiltIn\\Serial5\\BusPrefix) returned 2
ms_exsrial b init !
CPdd16554 init !
CPdd16554 init ist set up!
ms_exsrial b init false!
[NOTIFY] Module loaded
[NOTIFY] Initializing.
DB:OpenDB fail: DB DB_notify_queue not found
[NOTIFY] Initialization completed successfully
[NOTIFY] ProcessDatabase::started at local time 02/19/2006 12:14:50
[NOTIFY] HandleSystemEvent 7 /ADD COM1:
[NOTIFY] HandleSystemEvent 7 /ADD COM2:
[NOTIFY] HandleSystemEvent 7 /ADD NFY0:
Unknown: DEBUGCHK failed in file C:\\ymzki\\public\\COMMON\\oak\\drivers\\serial\\serpddcm\\.\\cserpdd.cpp at line 531
DEBUG_BREAK @c1036400 Ignored.
DEVICE!LaunchDevice: Init() failed for device 0xd00e6270
DEVICE!I_ActivateDeviceEx: couldn't activate: prefix COM, index 3, dll ms2_exserial.dll, context 0xd23ae684