LPCXpresso LPC1227 UART problem

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LPCXpresso LPC1227 UART problem

1,204件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nelmak on Wed Sep 05 19:54:57 MST 2012
Hi,

Is there an appropriate way to test if the UART module is corrupted?

I was working on the LPCXpresso board earlier when I had problems with starting the debugger. I had to reset the microcontroller and force it to boot in ISP mode.

The printf function works fine and prints the appropriate results to the console screen. However, when I try to send my information over Bluetooth to the Android phone, I receive random symbols and bits. I tried running the example printf application and it does the same thing.

I sent information over bluetooth before the errors started happening and it seems to have occurred after these errors began.

Thanks
0 件の賞賛
返信
6 返答(返信)

1,151件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by graynomad on Fri Sep 07 16:48:54 MST 2012

Quote:
I don't know how to solve this.


Buy a logic analyser, it's the best $150 you'll ever spend and IMO essential of you plan to spend any time with embedded processors.

The Saleae Logic is a good example.

http://www.saleae.com/logic
0 件の賞賛
返信

1,151件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nelmak on Fri Sep 07 09:48:47 MST 2012
If I reset the LPCXpresso into ISP mode, do I have to reset the UART back to its original configuration before I can use it again? I remember that it was working before I reset the LPCXpresso into ISP mode to gain access after getting a Bad ACK error.

Edit: Well, my plan now is to borrow an Arduino Uno from my university department and use it as a UART-TTL-USB bridge to my PC to see what kind of output im getting. Otherwise, I don't know how to solve this.
0 件の賞賛
返信

1,151件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by fjrg76 on Thu Sep 06 17:11:24 MST 2012
Try to connect the LPC Uart to a console (true console, not a virtual one, e.g. Putty).
0 件の賞賛
返信

1,151件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nelmak on Thu Sep 06 10:22:38 MST 2012
Thanks for the suggestions.

I am quite sure that the Bluetooth module and Android application is working correctly. I connected the TX and RX pins on the bluetooth module and sent characters from my application. I received the correct characters that I sent. So I know the application and bluetooth module is working fine.

I am using the printf function with a redirected _sys_write function to the UART. The printf should format my output as ascii before sending.

So they are effectively in the same format.

Edit:
I keep getting the Failed to connect: Ee(07) ACK error. I disconnect from the USB, reset to ISP mode and reconnect. The LPC-Link will fail to initialize. I unplug the USB and plug it into another port and it beings working again. This only started happening yesterday.

Ok, I programmed the app to notify me when it receives information and it provides a notification but the buffer is empty. However, I can send chars from my phone to the Bluetooth and back. So it has something to do with the way the UART is sending the data. Also, whenever I change the baud rates to any other rate other than 9600 it stops working.
0 件の賞賛
返信

1,151件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by graynomad on Thu Sep 06 07:58:03 MST 2012
I would look at the signal with a scope or logic analyser. Failing that loop Tx back to Rx and see if you get what you send.

Of course that second option doesn't help if you have incompatible settings between the LPC and BT, but it will prove that the hardware is working (It's highly unlikely that it's not BTW).
0 件の賞賛
返信

1,151件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by fjrg76 on Wed Sep 05 21:16:36 MST 2012
Hi

How can you know that the problem is not at the bluetooth side?

You should isolate the LPC Uart in order to test it alone, so you can figure out where the problem is.
0 件の賞賛
返信