cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

jamec_2673086
New Contributor II

Hello,

I am Jagir. I want to set the baud-rate to one of the UART component in my project programmatically.

I had gone through much APIs & functions But i did not find any way.

If any one had tried this ,Please guide me for that.

0 Likes
1 Solution
EvPa_264126
Valued Contributor II

for SCB use:      UART Basic ->Clock from terminal

I did this: https://community.cypress.com/thread/18953

baudrate.PNG

View solution in original post

0 Likes
4 Replies
Bob_Marlowe
Expert II

Select an external clock for your UART. There are APIs to change the clock divider, see "System Reference Guide" from Creator Help.

Bob

0 Likes
jamec_2673086
New Contributor II

Hi Bob,

Thanks for your response,

I got a function void CySysClkWriteSysclkDiv (uint32 divider) from this we can set appropreate devider but here i want to change baudrate of my uart component only Because i think this will change my system clock also.

Is there any API for UART SCB u know with that we can change devider to change baudrate ?

If i had changed it then is there any API to read it ?

0 Likes
Bob_Marlowe
Expert II

I wasn't quite right, sorry.

Use Clock_SetDivider() API for the clock you connected to the UART. See clock datasheet.

Bob

0 Likes
EvPa_264126
Valued Contributor II

for SCB use:      UART Basic ->Clock from terminal

I did this: https://community.cypress.com/thread/18953

baudrate.PNG

View solution in original post

0 Likes