iMX28 Windows CE 6.0 - Redirecting debug UART (DUART) to UART0

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iMX28 Windows CE 6.0 - Redirecting debug UART (DUART) to UART0

950 Views
pravinyadav
Contributor III

For iMX28 EVK, there are three UART's DUART, UART0 and UART1. We have a custom hardware with UART0 and UART1. In development phase, we used DUART externally but as a finished product we are going to use UART0 as a debug UART as well as general purpose port. I checked in BSP but there are lot of references in code for DUART (e.g. in XLDR.c, Args.c, debugserial.c etc). The DUART code is totally isolated from other UART code. So is it possible to achieve by changing BSP code or any alternative and efficient way to do this? 

Labels (2)
5 Replies

661 Views
pravinyadav
Contributor III

Done all modification in 'OEMInitDebugSerial' function for UART0 and it works as expected. Right now changes are implemented only for boot loader. Now i am trying to rename UART0 name of COM5 as COM1 but USB OTG function driver activesync are using same name 'COM1'. So modified required indexes from 'Platform.reg' file. Also add following index

[HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers\Serial_Class]

"Index"=dword:5 //COM5

but activesync showing error 608 while device boot.

Is anything missing?

0 Kudos

661 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hi Pravin,

Error 608 is could be due to some index values of COM is not according to the rigth you are using, please check the HKEY_LOCAL_MACHINE\Drivers\BuiltIn\COM values. Also drivers are loaded on the system under the key of HKEY_LOCAL_MACHINE\Drivers\Active, please check it.

Error "HTLLC" characters as output on console should be something related to power management on your device.

Hope this helps

661 Views
pravinyadav
Contributor III

Error 608 has resolved after configuring active sync port. one time configuration is needed. Also modified the baud rate to 115200.

661 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hi Pravin,

For Wince MX28 EVK bsp, The serial port driver is implemented as a stream interface driver and supports all the standard I/O control codes and entry points. The serial port driver handles all the internal UARTs except UART1 which is used for debugging. you could run the unit test and check the serial port details in Debugging and Testing > Tools for Debugging and Testing > Windows CE Test Kit > CETK Tests > Serial Port Driver Test > Serial Port Driver Test Cases in the Platform Builder Help.

Please refer to the Chapter 17 "Serial Driver" of the i.MX28 Windows Embedded CE 6.0 Reference Manual (EVK_imx28_WinCE60_RM.pdf) document:

i.MX283 Processors|High-Performance|Freescale

Regards

0 Kudos

661 Views
pravinyadav
Contributor III

Thanks for valuable inputs...

I am doing some initial analysis of DUART code. It seems that DUART is initialized in ROM code before bootloader (startup code) and display some characters (showing 'HTLLC' characters on teraterm)  still could not figure out exactly but this is initial observation. What i am trying to do instead of DUART, trying to initialize UART0 (COM1) in 'OEMInitDebugSerial' function of debugserial.c.

//pv_HWregUARTDbg = (PVOID) OALPAtoVA(CSP_BASE_REG_PA_UARTDBG, FALSE); //commented

pv_HWregUARTApp0_TEMP = (PVOID) OALPAtoVA(CSP_BASE_REG_PA_UARTAPP0, FALSE);

IN BSP, registers and mux settings are totally different for DUART and other UART's. First i am trying to modify 'OEMInitDebugSerial' method for UART0 and will check whether characters are displaying or not on UART0.

0 Kudos