Not applicable
Mar 01, 2015
02:36 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 01, 2015
02:36 PM
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.
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.
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_Abort_Receive(&MyUart);
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.
- Tags:
- IFX
6 Replies
Not applicable
Mar 02, 2015
06:13 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 02, 2015
06:13 PM
Hi toxico,
You can choose to use Standard Receive Interrupt where the interrupt will trigger when every data word received.
You can choose to use Standard Receive Interrupt where the interrupt will trigger when every data word received.
Not applicable
Mar 04, 2015
04:02 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 04, 2015
04:02 AM
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.
thanks
toxico
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.
thanks
toxico
Not applicable
Mar 05, 2015
09:05 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 05, 2015
09:05 PM
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.
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
Mar 11, 2015
08:16 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 11, 2015
08:16 PM
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.
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.
Sep 13, 2019
01:03 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 13, 2019
01:03 AM
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
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
Sep 13, 2019
07:21 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 13, 2019
07:21 AM
Hi,
Normally the UART APP is straightforward to use. Did you check the Usage section in the UART APP documentation?
Could you share your project?
Regards,
Jesus
Normally the UART APP is straightforward to use. Did you check the Usage section in the UART APP documentation?
Could you share your project?
Regards,
Jesus