Re: Serial driver
- From: "Chitra" <chitrar25@xxxxxxxxxxx>
- Date: 28 Dec 2006 01:41:39 -0800
Thank you for your reply.
I changed as u said, but I still have the same problem.
The problem is Whenever I reset my board it just prints only first
debug message which is in OEMWriteDebugString(); where as
EdbgOutputDebugString() doesn't print any debug messages. But when I do
step by step debugging using Multi Ice It prints the debug message from
OEMWriteDebugString(); only but not from EdbgOutputDebugString(). My
code hangs when I call EdbgOutputDebugString(). Has anybody faced this
problem. Please reply.
Thanks & Regards,
Chitra
voidcoder wrote:
You are trying to print multibyte string while OEMWriteDebugString()
is expecting wide (unicode) strings. Simply use L"Your text here"
or TEXT("Your text here") for string constants:
OEMWriteDebugString(L"Bootloader main INIT\r\n");
Chitra wrote:
Hi Steve,
Thanks for your reply. I got BSP for I.MX21 from Freescale
website and I am using this code as reference for UART. I am setting my
baud rate to 38400, 8 bits as my word size & UART1 for debugging. Here
is my code for printing the string.
void OEMWriteDebugString(unsigned short* str)
{
while((c = *str & 0XFF) != '\0')
{
while (!(port->USR2 & UART_USR2_TXFE_MASK));
port->UTXD = (*str & 0XFF);
if ((c = (*str >> 8) & 0xFF) != '\0') {
port->UTXD =((*str>>8) & 0xFF);
}
str++;
}
My first debug string is as follows:
OEMWriteDebugString((unsigned short *)"Bootloader main INIT\r\n");
OEMWriteDebugString((unsigned short *)"Bootloader main INIT_2\r\n");
After writing bootloader to flash and once I restart the board on
hyperterminal it
just displays the first string
Bootloader main INIT
During
& the rest of the messages are not being displayed. But when I do step
by step debugging using MultiIce it displays the 2nd string also only
if I give some time between the above two statements. I am not able
locate the problem.
Only OEMWriteDebugString() works where as EdbgOutputDebugString()
doesnot display any message. Please reply
Steve Maillet (eMVP) wrote:
I am developing BSP for MC9328MXL Litekit.Hard to say based on what you've posted so far. There are a lot of little
I have a problem in my serial driver. The debug messages are not being
displayed properly. I have followed i.mx21 code but still It is not
working properly. Whenever I reset, I just get only first debug
message, the rest are not displayed, but when I do single stepping
using MultiIce, It works but not perfectly. As anybody faced such a
problem.
subtleties about the i.MXL serial UARTs and some differences from the
i.MX21. If you posted more details it might help, you also might want to
consider using EmbeddedFusion to help with your design. We have a small CPU
module that includes the i.MXL, FLASH, RAM and an OS image ready to run.
Contact me directly for more information.
--
Steve Maillet
EmbeddedFusion
www.EmbeddedFusion.com
smaillet at EmbeddedFusion dot com
.
- Follow-Ups:
- Re: Serial driver
- From: voidcoder
- Re: Serial driver
- References:
- Serial driver
- From: Chitra
- Re: Serial driver
- From: Steve Maillet \(eMVP\)
- Re: Serial driver
- From: Chitra
- Re: Serial driver
- From: voidcoder
- Serial driver
- Prev by Date: Re: some question about WM5 update loader
- Next by Date: Re: GPIO driver for pxa270
- Previous by thread: Re: Serial driver
- Next by thread: Re: Serial driver
- Index(es):
Relevant Pages
|
|