1 Reply Latest reply on Jun 10, 2020 8:50 PM by BragadeeshV_41

    I2C detect sample - no UART output

    DmRu_4683001

      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 Motion Sensor Implementation" on Youtube

      WICED UART projects work ok.

        • 1. Re: I2C detect sample - no UART output
          BragadeeshV_41

          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