UART Communication block

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
misa_4395186
Level 2
Level 2
First like given

I am trying to use the UART communication block using CY8CKIT-043 prototype kit. I am using the standard UART block with the default settings. I only have two commands, UART_Start(); and UART_UART_PutString ("Hello World"); Fired up my Tera Terminal (Same UART settings) and I get nothing back. Is there something I am missing here?

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.

I changed the baud rate to 9600Bd because the emulated com-port on some machines can be a bit slow. Additionally I fixed Rx and Tx lines to P7_0 and P7_1 as shown in the schematics of the CY8CKIT-043. Project (untested) is attached.

Bob

View solution in original post

7 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Can you please post your complete project so that we all can have a look at all of your settings. To do so, use

Creator->File->Create Workspace Bundle (minimal)

and attach the resulting file.

Bob

0 Likes
lock attach
Attachments are accessible only for community members.

Here it is

0 Likes
lock attach
Attachments are accessible only for community members.

I changed the baud rate to 9600Bd because the emulated com-port on some machines can be a bit slow. Additionally I fixed Rx and Tx lines to P7_0 and P7_1 as shown in the schematics of the CY8CKIT-043. Project (untested) is attached.

Bob

Thank you Bob! this works

0 Likes
misa_4395186
Level 2
Level 2
First like given

What I am trying to do is use a UART block in order to change the TCPW Counter "Period" parameter. I am planning to do this by using the TCPW API command "TCPWM_WritePeriod(uint32 period)". For example I want the ability to enter a period value/s on the terminal and have the new period value/s get passed down to my TCPW counter/s. I am not quite sure the UART commands that will allow the handshaking between the Terminal and Counter via UART

0 Likes

First: It is unusual to change the period of a PWM on the fly. Better seems to be to change the compare value which will directly control the duty cycle of the PWM.

When you are on an experimental level I would suggest at first to increase the duty cycle using the on board button (which will need a software de-bouncing). Would be great when you can watch with a logic analyzer. When everything runs as expected you can turn to the (a bit complicated) job of UART receiving commands and someone is executing them. This is the typical job of a software named "Parser". You'll need to write one. I will search in my dungeons for an example....

Bob

0 Likes
lock attach
Attachments are accessible only for community members.

... and here we are

Program to control several servos by keyboard commands.

Happy coding!

Bob

0 Likes