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

cross mob
George_K
Level 1
Level 1
5 sign-ins First question asked Welcome!

Hi - I'm experimenting with the PSoC 6 BLE Pioneer Kit CY8CKIT-062-BLE by watching the PSoC 101 YouTube videos. I'm using PSoC Creator 4.2.0.641.

In video PSoC 6 101: Lesson 2-1a Basic UART Implementation, I cannot get any input from stdin (using Putty) to be echoed back to Putty. I do receive the opening "Started UART" message on Putty, but it appears that once getchar() is called, it never returns.

I double checked the UART pin assignments, retargeting I/O is selected in the PDL  and in file stdio_user.h, the #defines for IO_STDOUT_UART and IO_STDIN_UART are both set to UART_HW as outlined in the video. I went back and verified I followed the directions in the video correctly. 

I should mention that the kit was obtained from eBay. Are there any switch settings on the board that may be preventing operation?

Any ideas on why I'm not getting stdin with getchar() would be appreciated! Thanks.

code in main_cm4.c:

#include "project.h"
#include <stdio.h>

int main(void)
{
  __enable_irq(); /* Enable global interrupts. */

  /* Place your initialization/startup code here (e.g. MyInst_Start()) */
  UART_Start();
  setvbuf(stdin, NULL, _IONBF, 0);
  char c;
  printf("Started UART\r\n");

  for(;;)
  {
    /* Place your application code here. */
    c = getchar();
    if (c)
    {
      printf("%c", c);
    }
  }

}

0 Likes
1 Solution
Sidramesh_S
Moderator
Moderator
Moderator
250 sign-ins 100 replies posted 25 solutions authored

Hi @George_K ,

I created a project according to the training video in PSoC creator 4.4 and it was working fine.

Please check SW6 is present in PSoC 6 MCU position and SW7 is present in VDDD/KitProg2 position. You will find SW6 and SW7 switches on the back of the Board.

Please mention the PDL version which you are using in your project and you can find it in the Build Settings.

Also, ensure that in Putty you are setting the same Baud rate ( Default -115200bps)  that you are configured in the UART Block.

You could also try running our code examples that use print statements and check if that works and use it as a reference.

Thanks and regards,
Sidramesh

View solution in original post

0 Likes
2 Replies
Sidramesh_S
Moderator
Moderator
Moderator
250 sign-ins 100 replies posted 25 solutions authored

Hi @George_K ,

I created a project according to the training video in PSoC creator 4.4 and it was working fine.

Please check SW6 is present in PSoC 6 MCU position and SW7 is present in VDDD/KitProg2 position. You will find SW6 and SW7 switches on the back of the Board.

Please mention the PDL version which you are using in your project and you can find it in the Build Settings.

Also, ensure that in Putty you are setting the same Baud rate ( Default -115200bps)  that you are configured in the UART Block.

You could also try running our code examples that use print statements and check if that works and use it as a reference.

Thanks and regards,
Sidramesh

0 Likes
Sidramesh_S
Moderator
Moderator
Moderator
250 sign-ins 100 replies posted 25 solutions authored

Hi @George_K ,

Thread was locked due to inactivity for a long time, you can continue the discussion on the topic by opening a new thread with reference to the locked one. The continuous discussion in an inactive thread may mostly be unattended by community users.

 

Thanks and Regards,

Sidramesh

0 Likes