I2C detect sample - no UART output

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

cross mob
DmRu_4683001
Level 1
Level 1

Sample code is a copy of https://iotexpert.com/2019/08/05/i2c-detect-with-psoc-6/

The Library Manager tells something strange when attempting to add retarget-io library:

WARNING: Uncommitted/Untracked files detected in C:/Users/user/mtw/ProbeI2C/libs/TARGET_CY8CKIT-062-WIFI-BT.

  Save your work in source control before updating this library.

  Skipping current reference...

The code compiles and uploads ok but no serial info displayed, same in BMI160 with UART doesn't work on CY8C6247BZI-D54 as described in "PSoC 6 101: Lesson 3-5a Basic Moti...

WICED UART projects work ok.

0 Likes
1 Solution
BragadeeshV
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hi DmRu_4683001​,

MTB 2.x uses the retarget-io library to enable printf with the SCB block of PSoC 6. Please make sure you have followed these steps to retarget the standard input/output (STDIO) messages to a UART port.

1. Use Library manager to add retarget-io MW to your project.

2. Add #include "cy_retarget_io.h"

3.Call cy_retarget_io_init(CYBSP_DEBUG_UART_TX, CYBSP_DEBUG_UART_RX, CY_RETARGET_IO_BAUDRATE);CYBSP_DEBUG_UART_TX and CYBSP_DEBUG_UART_RX pins are defined in the BSP and CY_RETARGET_IO_BAUDRATE is set to 115200. You can use a different baud rate if you prefer.

4. Start printing using printf()

If the above steps doesn't work. Please share your project to us so that we can debug the issue at our end.

Regads,

Bragadeesh

Regards,
Bragadeesh

View solution in original post

0 Likes
1 Reply
BragadeeshV
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hi DmRu_4683001​,

MTB 2.x uses the retarget-io library to enable printf with the SCB block of PSoC 6. Please make sure you have followed these steps to retarget the standard input/output (STDIO) messages to a UART port.

1. Use Library manager to add retarget-io MW to your project.

2. Add #include "cy_retarget_io.h"

3.Call cy_retarget_io_init(CYBSP_DEBUG_UART_TX, CYBSP_DEBUG_UART_RX, CY_RETARGET_IO_BAUDRATE);CYBSP_DEBUG_UART_TX and CYBSP_DEBUG_UART_RX pins are defined in the BSP and CY_RETARGET_IO_BAUDRATE is set to 115200. You can use a different baud rate if you prefer.

4. Start printing using printf()

If the above steps doesn't work. Please share your project to us so that we can debug the issue at our end.

Regads,

Bragadeesh

Regards,
Bragadeesh
0 Likes