Looking for XMC 4500 UART App example code

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User4287
Level 1
Level 1
Hello,

I am looking for an example application, which operates the serial interface (USIC U0C0, Ports P1.4 and P1.5 for ASC functionality). It should include the initialization procedure as well as receiving and transmitting data via the serial interface.

The Hexagon Application Kit features a RS485 interface connected to ports P1.4 and P1.5.

Does anybody know of such an example application?

Best wishes

Helmut
0 Likes
14 Replies
ron
Employee
Employee
Hello Helmut,

We have several DAVE examples for download in our project library. Just go under DAVE to Help->Install Dave Apps/Example Library.

Regards
0 Likes
User4287
Level 1
Level 1
Hello Ron,

I managed to send a few characters thru the serial port of the XMC4500 using the UART001 App.
Thanks for your hint regarding the Apps Library.

Best wishes

Helmut
0 Likes
User8282
Level 1
Level 1
Hello.

I want to use the UART App for a serial RS-232 communication. I want to test the examples with the Hexagon kit, which includes an RS-485 connector. The Readme file of the examples says that an adaptor has to be used to connect to the PC. Can someone tell me what adaptor is needed? Do I have to use a commercial RS-485 to RS-232 converter? These converters have Data+ and Data- for the RS485 side. But the Hexagon connector has T+, T-, R+ and R-. Do I have to connect T+ and R+ to Data+, and T- and R- to Data-.

Thank you very much in advance.
José Luis.
0 Likes
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
joseluis wrote:
Hello.

I want to use the UART App for a serial RS-232 communication. I want to test the examples with the Hexagon kit, which includes an RS-485 connector. The Readme file of the examples says that an adaptor has to be used to connect to the PC. Can someone tell me what adaptor is needed? Do I have to use a commercial RS-485 to RS-232 converter? These converters have Data+ and Data- for the RS485 side. But the Hexagon connector has T+, T-, R+ and R-. Do I have to connect T+ and R+ to Data+, and T- and R- to Data-.

Thank you very much in advance.
José Luis.



Yes.. The Hexagon COM board is equipped with RS485 transceiver and connector. However I believe your PC does not have a RS485 connection, thus you need a RS485 to USB adapter.

http://www.ftdichip.com/Products/Cables/USBRS485.htm
0 Likes
Not applicable
Dear Infineon,

I am really sorry to tell you, but after a few hours of trying to make the XMC4500 Relax Kit work,
now I am planning to give it up. There were several problems with this "nice" product.

First of all, you guys make me use your "DAVE IDE" ( which is useless software, and a stupid urge for customers )
What if I would use a good quality KEIL or IAR IDE ? I can't...only DAVE worked for me, even if I tried to copy,
all of the header files... this is freakin...

- In the DAVE IDE, there is NO button for uploading the generated file ( rom? hex? ) onto the CPU.
- There is no shortcut for uploading the generated file.
- Ctrl + W does not work to close a tab.
- I couldn't even find the generated file in the folder, where the project is located.
- After the first succesful compilation I managed to upload ( Debug? WTF?! ) the software.
- I did not change anything, no options, and no modification in the main file, or elsewhere, altough the second compilation failed. LOL.
- I uploaded the compiled UART001 example on my board, set the terminal to the specified com port, and nothing happened, I got no "Hello World" message, even after resetting the board, and changing com port number...

I could continue writing, but I can only tell you:
I will sell my board as soon as possible, and buy another board from TI or anywhere... thanks for reading!

Good luck!
0 Likes
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
Hi sonus89,

Before you sell your board as junks, I would like to help you to get this thing up ASAP. Please wait for my solution.

Best Regards
Travis.
0 Likes
lock attach
Attachments are accessible only for community members.
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
Hi guys,

Attached is a project for UART running on XMC4500 relax kit. Please note that there is no virtual COM port in the relax kit hence you had to purchase a USB to serial UART interface such as the UB232R USB Mini-B FT232R Evaluation Module.

However for this purpose to verify your XMC configuration and software operation, you can simply short the transmit (P1.5) and receive (P1.4) pin.

Test procedure for this project
1. Hardware connection, short P1.5 (Tx) and P1.4 (Rx)
2. Import project into DAVE3.1.10 and run software.
3. Monitor array FifoReaddata[]
0 Likes
Not applicable
Hi Travis,

Sorry to all for bumping this thread, but I have a question...I also want to use an RS232 interface but I am using XMC4500 Relax kit lite so I don't have RS485 to use an adapter, how can I do such a thing?

Thanks,
Ahmed
0 Likes
User10683
Level 1
Level 1
Hi Ahmed,
I understand you want to use serial communication according to RS232 specification. May be the above thread confused you about RS485 and Rs232. For RS232 communication lets say with a PC you will need
a converter like for example the TTL-232R-3V3 from FTDI. You can connect this cable to the relax kits pins P1.4 and P1.5 and use the UART app in DAVE.
By the way DAVE is no useless software like someone wrote in this thread. I would love to work only with DAVE and not with Keil, because I think that the later is not really worth its price.

Hope this helps.
Matthias
0 Likes
Dave73778
Employee
Employee
First solution authored 5 sign-ins First reply posted
Hello Ahmed,

As Matthias has said, the Relax Kit just brings the raw TTL Rx and Tx signals out of the processor and so you need some sort of adaptor as described. The newer XMC4000 hexagon kit and the boards for the XMC1000 family have a second channel bought to the debug interface so this is the single wire debug (SWD) channel AND a serial (RS232) interface. So, by just plugging in the debug connector, you power the dev board, have a debug connection AND a virtual serial port. Unfortunately this is not possible on the Relax Kit.

Best regards,

Dave
0 Likes
Not applicable
Hi Matthias,

It does, thank you so much!
0 Likes
Not applicable
Is there a newer version for Dave4 for this XMC4500 UART example?

Or is there a good application note describing how to initialize UART communication on specific pins?
The user manual to read is a nightmare with two thousands of pages....and doesn't really help at all...
0 Likes
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

Have a look to Example Projects for DAVE.
Alternatively you can also have a look to the examples included in the XMCLib.

Regards,
Jesus
0 Likes
User15370
Level 2
Level 2
First like received First solution authored
Travis wrote:
Yes.. The Hexagon COM board is equipped with RS485 transceiver and connector. However I believe your PC does not have a RS485 connection, thus you need a RS485 to USB adapter.

Hello. Seven years too late, but if you have the COM_ETH-V1 Hexagon board, it is a RS422 connection rather than a RS485 connection, because it contains an Analog Devices ADM3074 (according to circuit diagram) or an ADM3077 (in real) whose transmitter outputs cannot be set into tristate mode.
0 Likes