UART Can't RX values XMC4

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

cross mob
user8710
Level 3
Level 3
5 questions asked 50 sign-ins 10 replies posted

I feel that no one responds to me in this "community".

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
Alakananda_BG
Moderator
Moderator
Moderator
50 likes received 250 sign-ins 250 replies posted

Hi @user8710 ,

Have you referred to our code examples related to UART in Dave?

https://www.infineon.com/cms/en/product/promopages/aim-mc/dave_downloads.html

Have you referred to our XMC lib code examples?

Regards,

Alakananda

View solution in original post

0 Likes
14 Replies
lock attach
Attachments are accessible only for community members.
Alakananda_BG
Moderator
Moderator
Moderator
50 likes received 250 sign-ins 250 replies posted

Hi @user8710 ,

Have you referred to our code examples related to UART in Dave?

https://www.infineon.com/cms/en/product/promopages/aim-mc/dave_downloads.html

Have you referred to our XMC lib code examples?

Regards,

Alakananda
0 Likes
Jose_Olin
Level 2
Level 2
First solution authored 5 likes given 10 sign-ins

Hi, @user8710 

I just start working with the XMC4700 a few days ago, so I haven't try PC -> XMC communication, only the other way.

I will try it tuesday and let you know.

Only I'm not using an Infineon IDE, but PlatformIO. There is an implementation to use the XMC with Arduino (which I use on PlatformIO.

 

In case the test is successful, you could check how PlatformIO is configuring the port.

 

We stay on the lookout.

 

0 Likes
Jose_Olin
Level 2
Level 2
First solution authored 5 likes given 10 sign-ins
#include <Arduino.h>

void setup()
{
    Serial.begin(115200);
}

void loop()
{
    if(Serial.available())
    {
        char c = Serial.read();
        Serial.println(c);
    }
}

 

@user8710 I confirm that this minimum code is working correctly on our XMC4700 Relax Kit on PlatformIO.

Can you test this minimum code on your board?

lock attach
Attachments are accessible only for community members.

Hello everyone

I made a basic example of serial echo, with a baud rate of 115200.

It is exactly as you described in the Arduino code.

You are using the interrupt when transmitting, normally I don't use interrupts when I'm going to transmit the data, only when receiving the data do I use the interrupt.

Really people here take a long time to answer things related to XMC. But if you need it, just call.

see you later.

Hi, @Rodrigo_RT thanks for sharing!

It's interesting to see how it's done in Dave.

I am using PlatformIO. Several days ago I made a query about the possibility of using the functions of the xlib library in PlatformiO and I'm waiting for a response still.

Hello Jose_olin.

Dave4 is very good, I like it a lot, it has many things to use.
I've never used PlatformIO, but I believe that if you use Dave and the Dave apps you will be able to do almost everything you need.

I just think it's bad that IFX people support the ARDUINO platform and don't have the portability of ARDUINO codes to DAVE, I already migrated some codes to DAVE to meet my need. And they work very well.

0 Likes

 

 

 

 

Hi

Sorry I didn't change the pins to what you're using.

In the image below, you can change the pins that are available for the UART. For your case, P0.0, and P0.1

Rodrigo_RT_0-1653588776939.png

 

I've been using XMC for about 6-7 years, and I really like it. I confess that there are not many help forums.
But Dave has the Help App which helps us a lot.
I intend to make some videos on how to use Dave and use the Help apps, unfortunately, I don't speak the English language perfectly, but I'll leave the parts with simultaneous translation.

 

 

 

 

 

0 Likes

hello user8710

I did the test changing to the same pins you are using.
It works normally, with the example I sent.
I tested with the Pin Settings in default mode.

Rodrigo_RT_2-1653660213397.png

 


And I tested how you configured it.

Rodrigo_RT_1-1653660186279.png

 


Both works, is that this pin is not having problems????

Do you have another Relax Kit to test???

Best Regards

0 Likes

 

 

 

 

0 Likes

Which Relax kit are you using?

Alakananda_BG
Moderator
Moderator
Moderator
50 likes received 250 sign-ins 250 replies posted

Hi @user8710 ,

Can you try to use the other UART pins and check if you can receive the data using those pins.

This will verify if the Docklight is sending data and we can confirm the same.

Regards,

Alakananda
Aashita_R
Moderator
Moderator
Moderator
50 likes received 100 solutions authored 250 replies posted

Hi @user8710 ,

There are few comments I would like to put forth, after going through the zip file which you have shared -

1. I see that in uart_config.c , you are using direct method for receiving. Please note that as per the information given in UART APP info that for direct method, the APP APIs implemented using 'Interrupt' or 'DMA' mode cannot be used. Please try checking this at your end.

2. Can you please let me know why is .tx_fifo_size and .rx_fifo_size disabled in your code?

3. Can you please try checking the set baudrate in Docklight?

4. Can you please try checking input source at your end, which is USIC1_CH1.DX0D in case of P0.0 for ASC(UART) RXD?

Best Regards,

Aashita