Re: Serial driver




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.
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.
Hard to say based on what you've posted so far. There are a lot of little
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

.



Relevant Pages

  • Re: Serial driver
    ... You are trying to print multibyte string while OEMWriteDebugString() ... doesnot display any message. ... I just get only first debug ...
    (microsoft.public.windowsce.platbuilder)
  • Re: A Simple BMP Converter
    ... "RegQueryValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal ... Private Sub cmdSysInfo_Click ... Open Registry Key ... > color bar in the color display. ...
    (comp.lang.basic.visual.misc)
  • Re: help collecting data.
    ... Dim GetC As String ... the code in the cell that I want the order numbers(info from column C ... "Otto Moehrbach" wrote: ... display them both, seperated by a comma ...
    (microsoft.public.excel.misc)
  • Re: Output data from multiple records in a table
    ... > Dim rsR As DAO.Recordset ... > Dim strSQL As String ... > such as display it in a textbox on your form. ...
    (microsoft.public.access.modulesdaovba)
  • Need help with GridView and LDAP/GC
    ... I could do the search with GC, and then lookup more ... DirectoryEntry searchRoot = new ... // Add search string if specified. ... // Display Name ...
    (microsoft.public.dotnet.framework.aspnet)