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

cross mob
Not applicable
Hi Guys,

since the exhibition "embedded world" in Germany, Im totally new in the infineon world. I got a XMC1300 and the DAVE 4 IDE. I enjoyed working with it. Very easy to use, but with the "UART" App I have a problem. I configured the app:
General: Full Duplex, 19200, 8, 1, No Parity
Advanced: 16 Oversampling, Enable transmit FIFo 16, Enable Receive FIFO: 16
Interrupt Settings: End of transmit Callback: EndOfTransmit, End of Receive Callback: EndOfReceive

From the help I have the following code and copied it to my Receive ISR.

uint8_t data[] = "Command received";
uint8_t rec_data[10];

void EndOfReceive() //Callback function for "End of receive" event.
UART_Receive(&MyUart, rec_data, 15);
while(MyUart.dynamic->rx_data_index == 0);
if(MyUart.dynamic->rx_data[0] == 0x0D)
UART_Transmit(&MyUart, data, sizeof(data) - 1);

My goal is, that I can input any command that ends with an carriage return. As a second step I want to differ between different commands.
I expected, that the routine starts if something received. After that it starts the receiption which is aborted by receiving a carriage return.
But it doesnt work.

I also tried to disable the endoftransmit and endofreceive functions and copied everything to the while loop. But this does also not work.

How can I reach my goal.
The easiest way would be if I had an ISR if one character is received.
6 Replies
Not applicable
Hi toxico,

You can choose to use Standard Receive Interrupt where the interrupt will trigger when every data word received.
Not applicable
Hi Jackson,

thanks a lot for your support and sorry for asking further. I don't got it yet.
What do you mean with standard interrupt? In the uart App I can only select EndOfReceive

If I use a normal Interrupt App I can not connect it with the Uart-App. Of course UART does not have a pin.

So what exactly do you mean with "Standard Receive Interrupt"? I really don' have a clue.


Not applicable
Hi toxico,

Sorry to confuse you.
I'm referring to the interrupt that available on the product itself rather than the setting available on DAVE4.
Our USIC module does support the interrupt of receiving each byte and is called Standard Receive Interrupt.
Let me go though the APP on DAVE4 on how to do this setting.
Not applicable
Hi toxico,

After looking at the DAVE4 UART APP, it seems the use case only support FIFO.
So in this case, to receive one byte each time, you have to use the xmc_uart XMCLib for your application.
In the UART APP, disable the FIFO setting (uncheck the enable FIFO box) in 'Advance Setting' and don't set anything on the 'Interrupt Setting'.
After you have generated the code, go to the file uart_conf.c under UART folder.
Add your receive function declaration with extern (i.e.: extern void StandardReceived (void)) to that file and replace your function in UART_0_rx_handler().
Then in your main.c, add the enable interrupt for Standard receive with XMC_UART_CH_EnableEvent(XMC_UART0_CH1,XMC_UART_CH_EVENT_STANDARD_RECEIVE);
Then, add your receive function and use XMC_UART_CH_GetReceivedData to get your received data.

Note: With this workaround, should you need to regenerate your code again, you have to add back the code that you have made in uart_conf.c after code generation.

Level 1
Level 1
Hi, I'm having a weird issue with the UART on XMC1300 as well.

I generated code through DAVE for ints and rx FIFO and get break ints and rx noise ints ok but I never see the rx FIFO int happen.

Is there some magic setup that DAVE doesn't do ie. has to be done manually or something?

Is there perhaps an int example somewhere that I can download?

I turn an LED on to prove that the break has occurred and have code to turn it off when rx bytes come in but that's in the callback doesn't get called.

I have greatly diminished my residual follicles on this exercise, Please help if you can
10 sign-ins 5 sign-ins First like received

Normally the UART APP is straightforward to use. Did you check the Usage section in the UART APP documentation?
Could you share your project?