lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] Debuging thru UART


From: Nico Sachs
Subject: [lwip-users] Debuging thru UART
Date: Tue, 17 Jul 2012 21:23:44 +0200

Hi,
Im trying to debug with uart.

Ive setted up following definings in cc.h:

#ifdef  SCI_DEBUG_OUTPUT
#define LWIP_PLATFORM_DIAG(x)      { char
tmpbuf[256];sprintf(tmpbuf,(char *)x);SCI2_PullString(tmpbuf);}
#define LWIP_PLATFORM_ASSERT(x)    { char
tmpbuf[256];sprintf(tmpbuf,(char *)x);SCI2_PullString(tmpbuf);}

and my pullstring function is like this:

void SCI2_PullString(char * msg_string)    //transmit strings
{
unsigned char i;        
        
/* This loop reads in the text string and puts it in the SCI2 transmit buffer */
for (i=0; msg_string[i]; i++)
{
        /* Wait for transmit buffer to be empty */
        while(SCI2.SSR.BIT.TEND == 0);

        /* Write the character out */
        SCI2.TDR = msg_string[i];
        }
}


and now the debug output is this one:

Ôöôõ'1½ü¹Ðƒa›Dx¸÷©netif_set_ipaddr: netif address being changed
ôõ'1½ü¹Ðƒa›DâD2zÐ
Ôöôõ'1½ü¹Ðƒa›DD2zÐ
Ôöôõ'1½ü¹Ðƒa›D


so it seems to, that the sprintf function don´t work properly.

Does someone have an idea whats wrong here?

Regards Nico



reply via email to

[Prev in Thread] Current Thread [Next in Thread]