虽然摩托罗拉现在也出售给了斑马公司,但针对行业设备的支持还说的过去,但是网上针对SE4500在TI Omap平台的调试文章少之又少,不信你随便搜搜互联网。 公司使用的是TI(德州仪器)公司提供的方案Omap37xx系列Mpu,系统是WM6.5(Windows Mobile 6.5.3)的,调试
虽然摩托罗拉现在也出售给了斑马公司,但针对行业设备的支持还说的过去,但是网上针对SE4500在TI Omap平台的调试文章少之又少,不信你随便搜搜互联网。
公司使用的是TI(德州仪器)公司提供的方案Omap37xx系列Mpu,系统是WM6.5(Windows Mobile 6.5.3)的,调试到SE4500的时候,开始是I2C问题,I2C死活不通,后来解决了I2C读写问题,但是在上层应用层调用对应的API获取图像数据,就直接崩溃了,但是地址打印出来,还是可以看到对应的地址的,但是使用IsBadPtr测试该指针以后,不可以读,只要一读,直接崩溃(data abort)。
这个问题是这样的,需要修改摩托罗拉提供的驱动程序的部分代码,修改基本上如下:
驱动添加根据Motorola\Motorola Software Decode SDK for ARM\Drivers\TI\cam_SE4500\WM65 目录下的readme.txt操作,
在对应的drvr_intf.cpp源文件的CAM_IOControl()函数中,具体修改如下:
<pre name="code" class="cpp"> case SE45_IOCTL_ALLOC_BUFFER: if ((pBufOut == NULL) || (dwLenOut dwBufferCount - 1) * sizeof(DWORD))) || (pdwActualOut == NULL)) { dwReturn = ERROR_INVALID_PARAMETER; goto BadParameter; } else { UINT i, nOutputByteCount; PSE45_ALLOC_BUF_REQ pAllocReq; HANDLE hCaller; PBYTE pVirtAddr; //wince5.0.2内核限制,所以必须增加该判断 #if (_WINCEOSVERdwBufferCount - 1) * sizeof(DWORD); #if (CE_VERSION == 5) //hCaller = GetOwnerProcess(); //为什么要注释掉上面一行代码,改成下面这行?因为调用的同时,他们应该是同一进程地址空间 hCaller = GetCurrentProcess(); pAllocReq = (PSE45_ALLOC_BUF_REQ )MapCallerPtr( pBufOut, nOutputByteCount ); #endif #if ((CE_VERSION == 6) || (CE_VERSION == 7)) // hCaller = OpenProcess(0, FALSE, GetCallerVMProcessId()); hCaller = OpenProcess(0, FALSE, GetDirectCallerProcessId()); // CE 6 automatically marshals the IOCTL parameters mapCallerPtr() is obsolete pAllocReq = (PSE45_ALLOC_BUF_REQ)pBufOut; #endif if (NULL == pAllocReq) { dwReturn = ERROR_INVALID_PARAMETER; goto BadParameter; } // Reset the user buffers in the low level driver camera_reset_buffers(pDev); pAllocReq->nNumBuffers = pDev->dwBufferCount; pAllocReq->nBufferSize = pDev->dwBufferSize; // Save the caller handler pDev->dstProcess = hCaller; /* return a list of buffer start addresses mapped to caller's process space */ for (i = 0; i dwBufferCount; i++) { if (camera_get_buffer_addr(pDev, i, &pVirtAddr)) { #if (CE_VERSION == 5) pAllocReq->ppBuffers[i] = (DWORD )MapPtrToProcess(pVirtAddr, hCaller); #endif #if ((CE_VERSION == 6) || (CE_VERSION == 7)) pAllocReq->ppBuffers[i] = (DWORD)VirtualAllocCopyEx(GetCurrentProcess(), hCaller, pVirtAddr, pDev->dwBufferSize, PAGE_READWRITE); #endif // Save it in the driver context for freeing this memory later pDev->baseAddr[i] = pAllocReq->ppBuffers[i]; } else { pVirtAddr = NULL; pAllocReq->ppBuffers[i] = (DWORD)NULL; } DEBUGMSG(ZONE_IOCTL, (TEXT("SE4500 : App:0x%x mapped from Kernel:0x%x\r\n"),pAllocReq->ppBuffers[i], pVirtAddr)); } *pdwActualOut = sizeof(DWORD) * (pDev->dwBufferCount - 1) + sizeof(SE45_ALLOC_BUF_REQ); #if (_WINCEOSVER<br> <pre class="brush:php;toolbar:false">
后来就考虑直接在系统驱动里面,将获取到的图像直接保存到文件,这里似乎有一个问题,保存文件操作是在单独的一个线程里面做的,是异步操作,有可能出现保存数据只有部分的情况。经过多次测试,传输过来的图像752 x 480分辨率始终是条纹状,要么颜色不对,基本上都是如下图像:
在驱动图像帧回调函数中保存了这些图片,基本上过来30多张只有一两张还能看得到图像,其他基本上都是斜的条纹,颜色明显不对,正常的颜色是应该是黑白单色。后来查硬件问题,发现是PCLK的电平转换芯片的最大支持频率不够,和其他公司一样,你使用TI的方案,那周边的什么PMIC,电平转换芯片等等都用他的,做高通、MTK的也都一个样。
本来用的是TXS0104/08针对SE4500的PCLK过来的3.3V电平,转换成1.8V的提供给Omap37xx,结果发现TXS0104/08在Vcca为1.8V时最大支持的data rate只有24Mbps(参考该电平转换芯片手册),远远不够。
前前后后折腾了几个月,没有解决这个问题,后来换成了TXB0104/08系列电平转换芯片,用了摩托提供的C#写成的SDL_GUI测试程序,SE4500出光了以后直接就解码了。
至此,问题已经得到解决,但是总结一点。也许是TI针对大多数的应用场景,根本不需要多高的数据速率,只是简单的电平转换而已,但是用在视频传输上,电平转换的芯片选择就尤为重要了,速率不对,传过来的数据就有可能是错的。芯片选型的时候,一定要充分考虑它的应用场景。

MySQLoffersvariousstorageengines,eachsuitedfordifferentusecases:1)InnoDBisidealforapplicationsneedingACIDcomplianceandhighconcurrency,supportingtransactionsandforeignkeys.2)MyISAMisbestforread-heavyworkloads,lackingtransactionsupport.3)Memoryengineis

Common security vulnerabilities in MySQL include SQL injection, weak passwords, improper permission configuration, and unupdated software. 1. SQL injection can be prevented by using preprocessing statements. 2. Weak passwords can be avoided by forcibly using strong password strategies. 3. Improper permission configuration can be resolved through regular review and adjustment of user permissions. 4. Unupdated software can be patched by regularly checking and updating the MySQL version.

Identifying slow queries in MySQL can be achieved by enabling slow query logs and setting thresholds. 1. Enable slow query logs and set thresholds. 2. View and analyze slow query log files, and use tools such as mysqldumpslow or pt-query-digest for in-depth analysis. 3. Optimizing slow queries can be achieved through index optimization, query rewriting and avoiding the use of SELECT*.

To monitor the health and performance of MySQL servers, you should pay attention to system health, performance metrics and query execution. 1) Monitor system health: Use top, htop or SHOWGLOBALSTATUS commands to view CPU, memory, disk I/O and network activities. 2) Track performance indicators: monitor key indicators such as query number per second, average query time and cache hit rate. 3) Ensure query execution optimization: Enable slow query logs, record and optimize queries whose execution time exceeds the set threshold.

The main difference between MySQL and MariaDB is performance, functionality and license: 1. MySQL is developed by Oracle, and MariaDB is its fork. 2. MariaDB may perform better in high load environments. 3.MariaDB provides more storage engines and functions. 4.MySQL adopts a dual license, and MariaDB is completely open source. The existing infrastructure, performance requirements, functional requirements and license costs should be taken into account when choosing.

MySQL uses a GPL license. 1) The GPL license allows the free use, modification and distribution of MySQL, but the modified distribution must comply with GPL. 2) Commercial licenses can avoid public modifications and are suitable for commercial applications that require confidentiality.

The situations when choosing InnoDB instead of MyISAM include: 1) transaction support, 2) high concurrency environment, 3) high data consistency; conversely, the situation when choosing MyISAM includes: 1) mainly read operations, 2) no transaction support is required. InnoDB is suitable for applications that require high data consistency and transaction processing, such as e-commerce platforms, while MyISAM is suitable for read-intensive and transaction-free applications such as blog systems.

In MySQL, the function of foreign keys is to establish the relationship between tables and ensure the consistency and integrity of the data. Foreign keys maintain the effectiveness of data through reference integrity checks and cascading operations. Pay attention to performance optimization and avoid common errors when using them.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

Dreamweaver Mac version
Visual web development tools
