1 Reply Latest reply on Jan 15, 2016 1:35 AM by bob.marlowe

    Using UART and I2C together


      I have 2 sensors, and oxygen sensor that communicates through uart and an accelerometer that uses i2c. Both works correctly by themselves but when I try to run them together, I can no longer read from the accelerometer. I was wondering if psoc 4 ble allows for one uart and one i2c to run at the same time. They are both scb blocks, one configured for i2c and the other for uart. I know there is a dedicated uart block but we need that for another sensor that is also using uart.

        • 1. Re: Using UART and I2C together

          When you place components onto the topdesign schematic and successfully build the project you may control via the "Resources" tab the complete usage. I2C and UART will go together.


          Some pitfalls coming to my mind are

          • Float formatting
          • Buffer overflows
          • Bad interrupt handling

          An easy check could be to put the I2C handling into a critical section (CyEnterCriticalSection()) to see if something changes.