Not applicable
Nov 01, 2015
11:30 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nov 01, 2015
11:30 PM
Hi, I am working on XMC4100 UART. I wanna change UART baudrate at run time.I wanna do these baudrate update in same function. This is my use case ..
Switch(Baudrate)
{
case 9600:
UART_Baudrate(9600);
Send("Baudrate at 9600 \n");
break;
case 115200:
UART_Baudrate(115200);
Send("Baudrate at 115200 \n");
break;
case 256000:
UART_Baudrate(256000);
Send("Baudrate at 256000 \n");
break
}
The baudrate which was set first (9600) is working fine. But when I am trying to update new baudrate, there is a mismatch. please help
Switch(Baudrate)
{
case 9600:
UART_Baudrate(9600);
Send("Baudrate at 9600 \n");
break;
case 115200:
UART_Baudrate(115200);
Send("Baudrate at 115200 \n");
break;
case 256000:
UART_Baudrate(256000);
Send("Baudrate at 256000 \n");
break
}
The baudrate which was set first (9600) is working fine. But when I am trying to update new baudrate, there is a mismatch. please help
Labels
- Tags:
- IFX
4 Replies
Nov 02, 2015
09:20 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nov 02, 2015
09:20 PM
You have to ensure that the UART had complete transmission and receive, before you can change the baud rate.
Not applicable
Nov 04, 2015
09:58 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nov 04, 2015
09:58 PM
Hi Travis, Thanks for the response. Got solution for this problem. I just had to check TX and RX idle status bits before updating the new baudrate.
Not applicable
Feb 10, 2016
02:42 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 10, 2016
02:42 AM
Salman11053 wrote:
Hi Travis, Thanks for the response. Got solution for this problem. I just had to check TX and RX idle status bits before updating the new baudrate.
could you please spell out which registers are you referring to? Do you mean PSR.RXIDLE and PSR.TXIDLE ?
Feb 10, 2016
07:31 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 10, 2016
07:31 PM
Hello,
Yes, these must refer to the bits PSR.RXIDLE and PSR.TXIDLE.
Regards,
Min Wei
Yes, these must refer to the bits PSR.RXIDLE and PSR.TXIDLE.
Regards,
Min Wei