- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I've been using DAVE IDE to program my XMC4700 Relax Kit. I've tried using some sample code to get UART working, but keep getting the error as shown in the title. Additionally, I am also receiving warnings for implicit declaration of function 'UART_Transmit' and 'UART_RECEIVE'.
The UART_0 APP is in the APP Dependency tree, and I've followed all the steps outlined in the UART index.chm file. I think the UART APP must not be initializing correctly. Any help would be appreciated. Thanks
Here is my code:
#include "DAVE.h"
uint8_t data[] = "Infineon Technologies";
uint8_t rec_data[10];
int main(void)
{
DAVE_STATUS_t status;
status = DAVE_Init(); /* Initialization of DAVE APPs */
if(status == DAVE_STATUS_FAILURE)
{
/* Placeholder for error handler code. The while loop below can be replaced with an user error handler */
XMC_DEBUG(("DAVE Apps initialization failed with status %d\n", status));
while(1U)
{
}
}
UART_Transmit(&UART_0, data, sizeof(data) - 1); //Transmit the string "Infineon Technologies".
while(1U)
{
}
return 1;
}
void EndofTransmit()//Callback functin for "End of transmit" event.
{
UART_Receive(&UART_0, rec_data, sizeof(rec_data));
}
void EndofReceive()//Callback function for "End of receive" event.
{
UART_Transmit(&UART_0, rec_data, sizeof(rec_data));
}
Solved! Go to Solution.
- Labels:
-
XMC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, @PierceBoughton ,
Are you using our official routine? Or do you add an 'UART' APP to your code yourself?
If you add APP by yourself, do remember to click 'Generate Code' to generate relevant function definitions.
You can refer to the attachment, or you can share your project with us. Hope this can help you.
BR,
Owen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, @PierceBoughton ,
Are you using our official routine? Or do you add an 'UART' APP to your code yourself?
If you add APP by yourself, do remember to click 'Generate Code' to generate relevant function definitions.
You can refer to the attachment, or you can share your project with us. Hope this can help you.
BR,
Owen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes. All fixed. Thank you!