cancel
Showing results for 
Search instead for 
Did you mean: 

Knowledge Base Articles

How to Change the UART Baud Rate During the Runtime on PSoC - KBA230021

ChaitanyaV_61
Employee

How to Change the UART Baud Rate During the Runtime on PSoC - KBA230021

Author: EktaN_26           Version: **

Translation - Japanese: PSoCの動作中にUARTボーレートを変更する方法 - KBA230021 - Community Translated (JA)

1. Select the UART Component from the Component Catalog and place it in the *TOPDesign.cysch tab as shown in Figure 1.

Figure 1. Placing the UART Component in the TOPDesign.cysch

pastedImage_2.png

2. Double-click on the UART Component and enable the “Clock Terminal” in the Configure ‘UART’ as shown in Figure 2.

Figure 2. Configure the UART Component

pastedImage_9.png

3. Connect an external clock to the UART Component and configure the Frequency of the clock, according to the initially required baud rate as shown in Figure 3.

Figure 3. Add an External Clock to the UART Component

pastedImage_16.png

4. During run time, change the clock divider value to change the baud rate by using Clock_SetDivider(uint16 divider) to change the baud rate of the UART as shown in the following code snippet (the baud rate is set to 9600; the baud rate can be modified depending on the clock set divider value and by setting the appropriate external clock frequency).

pastedImage_22.png

5. Now, the actual baud rate is set to 9607 bps.

Figure 4. Setting the Baud Rate

pastedImage_33.png

0 Likes
Version history
Revision #:
1 of 1
Last update:
‎Apr 13, 2020 10:58 PM
Updated by:
 
Contributors