|
串口问题已经解决,确实是波特率不对,不过是clock不对引起的,
if (!KernelIoControl(IOCTL_PROCESSOR_INFORMATION, NULL, 0, &procInfo, sizeof(PROCESSOR_INFO), &dwBytesReturned))
{
m_s3c2440_pclk = DEFAULT_S3C2440A_PCLK;
RETAILMSG(TRUE, (TEXT("WARNING: CReg2440Uart::CReg2440Uart failed to obtain processor frequency - using default value (%d).\r\n"), m_s3c2440_pclk));
}
else
{
//m_s3c2440_pclk = procInfo.dwClockSpeed;
//++++++modified by sunwave
m_s3c2440_pclk = 50625000;
RETAILMSG(TRUE, (TEXT("INFO: CReg2440Uart::CReg2440Uart using processor frequency reported by the OAL (%d).\r\n"), m_s3c2440_pclk));
}
现在的问题是不知道在BSP哪里改由KernelIoControl函数得到的procInfo.dwClockSpeed,我是硬改的。 |
|