Newbie Question - UART as a debug interface

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Newbie Question - UART as a debug interface

1,484 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by a.unique.identifier on Mon May 14 07:21:20 MST 2012
I would like to use the LPC1343 UART as an output channel for debuging purposes. I intended on using a standard FDTI TTL to USB serial interface, a single TXD line (!!!?), most probably the NXP UART code and teminal emulation program for Windows 7.

Any helpful hints - with respect to the processor / debugging / hardware inteface / terminal emulation - from people that have been down this path before? Is putty the best alternative to HyperTerminal, which is no longer included in Windows 7 (but theoretically can be gotten from an XP installation)?

Thanks in advance....
0 项奖励
回复
4 回复数

1,464 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by a.unique.identifier on Mon May 14 10:33:30 MST 2012
...where do you find all these links???

Again, thank you!

...joseph
0 项奖励
回复

1,464 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Mon May 14 10:24:45 MST 2012
As shown in picture above there are just 3 wire necessary RX/TD and GND, no handshaking

Easiest way to start is to create a working semihosting project and retarget it to UART:

http://support.code-red-tech.com/CodeRedWiki/UartPrintf

with something like:
//use UART for printf
int __sys_write(int iFileHandle, char *pcBuffer, int iLength)
{
 UARTSend(pcBuffer,iLength);            //send data buffer to UART
 return iLength;
}
So you can use formating of printf

Don't forget to reduce code size with CR_INTEGER_PRINTF symbol:

http://support.code-red-tech.com/CodeRedWiki/UsingPrintf?highlight=%28CR\_integer%29
0 项奖励
回复

1,464 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by a.unique.identifier on Mon May 14 09:52:13 MST 2012
Basically if that was the right way to go, but also if all that is required is the TXD line (without handshaking). Finally, if there are any "gotchas" with respect to sending the data in this fashion. Ex. Don't use printf I imagine, use the codebase so and so as this the most reliable, etc...

I ordered a breakout board from Elektor - it's quite versital and all the connections are easily accessable.

Thx for the TeraTerm tip!
0 项奖励
回复

1,464 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Mon May 14 08:27:47 MST 2012

Quote: a.unique.identifier
Any helpful hints - with respect to the processor / debugging / hardware inteface / terminal emulation - from people that have been down this path before?



What is the question here :confused:

Just add a FTDI chip or buy a cheap USB-RS232 with FTDI and solder out the RS232 part  :eek:

In Germany you can buy this one:

http://www.reichelt.de/USB-Konverter/DIGITUS-DA-70156/3/index.html?;ACTION=3;LA=446;ARTICLE=99617;GR...

and remove RS232 part to:  http://flic.kr/p/bCdFve

See: #15 of http://knowledgebase.nxp.com/showthread.php?t=1931


Quote:

Is putty the best alternative to HyperTerminal,...

I like TeraTerm:

http://ttssh2.sourceforge.jp/
0 项奖励
回复