Hi all.
I'm using OM13098 board with LPC 54628. First, I used the UART drivers demo from SDK_2.4.1_LPCXpresso54628 which uses UART0 through USB debug link VCOM.
After I adapted the basic Uart Polling echo demo to use UART4 (FlexComm4) from J13 pin 13/15 (TX/RX) [lpc pin 3_26/ pin3_27]. No problem for the UART to receive data from a USB-RS232_0V converter and using TeraTerm. But here i'm facing a issue for the TX. Every data is not well displayed by TeraTerm, so I decided modify code to send only character "a" and check signal on J13 pin 15.
In picture in attachment, signal is +/-250mV ?! I don't unsterdand why. It should be between 0V and +5V. Code in attachment
Thanks for any help,
Regards
Solved! Go to Solution.
Hi arecz,
Your oscilloscope is really very special, do you have any other oscilloscope ?
Can you try another oscilloscope? Take an example Tektronix.
I never used the Hand oscilloscope like your type.
Have a great day,
Kerry
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi arecz,
Your problem is mainly caused by the code, I have tested on my side, it works OK.
I think you didn't modify this point, board.h
/*
#define BOARD_DEBUG_UART_TYPE DEBUG_CONSOLE_DEVICE_TYPE_FLEXCOMM
#define BOARD_DEBUG_UART_BASEADDR (uint32_t) USART0
#define BOARD_DEBUG_UART_INSTANCE 0U
#define BOARD_DEBUG_UART_CLK_FREQ CLOCK_GetFreq(kCLOCK_Flexcomm0)
#define BOARD_DEBUG_UART_CLK_ATTACH kFRO12M_to_FLEXCOMM0
#define BOARD_DEBUG_UART_RST kFC0_RST_SHIFT_RSTn
#define BOARD_DEBUG_UART_CLKSRC kCLOCK_Flexcomm0
#define BOARD_UART_IRQ_HANDLER FLEXCOMM0_IRQHandler
#define BOARD_UART_IRQ FLEXCOMM0_IRQn
*/
#define BOARD_DEBUG_UART_TYPE DEBUG_CONSOLE_DEVICE_TYPE_FLEXCOMM
#define BOARD_DEBUG_UART_BASEADDR (uint32_t) USART4
#define BOARD_DEBUG_UART_INSTANCE 4U
#define BOARD_DEBUG_UART_CLK_FREQ CLOCK_GetFreq(kCLOCK_Flexcomm4)
#define BOARD_DEBUG_UART_CLK_ATTACH kFRO12M_to_FLEXCOMM4
#define BOARD_DEBUG_UART_RST kFC0_RST_SHIFT_RSTn
#define BOARD_DEBUG_UART_CLKSRC kCLOCK_Flexcomm4
#define BOARD_UART_IRQ_HANDLER FLEXCOMM4_IRQHandler
#define BOARD_UART_IRQ FLEXCOMM4_IRQn
After the modification, the printf information:
Please note, J13_13 is P3_27-FC4_TXD, you need to connect it to USB-TTL RXD.
J13_15 is P3_26-FC4_RXD, you need to connect it to USB-TTL TXD.
Wish it helps you!
Have a great day,
Kerry
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi Kerry, thank you for your reply.
So I connected :
J13_15 is P3_27-FC4_TXD to USB-TTL RXD.
J13_17 is P3_26-FC4_RXD to USB-TTL TXD.
and is it not better. I have no signal on J13_15 when sending my "a" character. Where did you find this pinout information?
For code i'm based on SDK2.4.1 and using IAR 8.30.
Hi arecz,
Still use the UART4.
Your connection is not correct:
J13_13 is P3_27-FC4_TXD, you need to connect it to USB-TTL RXD.
J13_15 is P3_26-FC4_RXD, you need to connect it to USB-TTL TXD.
P4_1 is the GND.
Please note, GND must connect.
This is my test wave:
Yellow: LPC54628 RX
Blue: lpc54628 TX
Please also check my attached code:
Have a great day,
Kerry
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi Kerry,
My USB tool is USB-RS232_WE_1800_BT_0.0 from FTDI Chip.
WIth your code I have the same result as before. Signal is bad.
Hi arez,
Do you have any other TTL-USB tool?
I think it is related to your TTL-USB tool, it is the 3.3V or the 5V in TX and RX?
Actually, even you didn't add the TTL-USB tool, when you test the mcu UART TX pin()J13_13, the UART send out data wave is very clean.
Please check my test result for J13_13 without the TTL-USB tool:
You can test it on your side.
I suggest you find a ttl-usb tool which can support 3.3V signal.
As you know, LPC54628 is the 3.3V mcu.
Wish it helps you!
Have a great day,
Kerry
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi. This is my TX signal. No connection to my TTL-USB tool. My LPC54628 is powered by USB connected to a computer dock station.
Hi arecz,
Check your Oscillator, do you connect the GND to the board?
This wave is very strange.
It seems the oscilloscope GND is not stable.
Can you change another Channel?
GND you can use P3.
Have a great day,
Kerry
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi Kerry,
This is my set. Change to channel B on scope. Ground from P3.
I tried with Flexcomm4, Flexcomm9 (from Slave PMOD output) and Flexcomm0. Always same result...
When I tried Flexcomm0 on P4, I connected JP6 as described in user manual but nothing changed.
Hi arecz,
Your oscilloscope is really very special, do you have any other oscilloscope ?
Can you try another oscilloscope? Take an example Tektronix.
I never used the Hand oscilloscope like your type.
Have a great day,
Kerry
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
I will buy new one.
I will let you now when i'm ready again.
Thanks for you help.
Hi Arecz,
Actually, you can borrow one from your colleague to test it.
Any updated information, just let me know.
Have a great day,
Kerry
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi Kerry,
So I had checked signal with a good scope. All signals were fine. So I decided to change my USB tool. I just receive it and try with it. The NXP demo are working well now.
Thank you for your support.
Hi Arecz,
That't very happy to hear you get the good wave now.
Actually, after I check your scope picture, I am suspect your oscilloscope, I don't believe the Hand oscilloscope tool.
If you still have question about this topic, please kindly let me know.
If your question is solved, please help me to mark the correct answer, just to close this case.
Have a great day,
kerry
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi arecz,
I also use the SDK_2.4.1_LPCXpresso54628 and IAR8.3X.
It works ok on my side.
When reset the chip, can you output the signal like me in my above last reply?
Please also check your TTL-USB tool, you need to make sure it works, please also connect your TTL-USB GND to the board.
Wish it helps you!
Have a great day,
Kerry
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hi Kerry,
My TTL_USB tool works fine. I already have good result with a PIC18.
I restart again from the original demo uart polling which uses UART8. According to board user manual, you can find UART0 TX/RX pin on P4 but need you connect jumper JP6.
Teraterm output.
And signal for echo demo sending charactere "a" from Teraterm:
green is TTL_USB_TX connected to LPC RX.
yellow is TTL_USB_RX connected to LPC TX.