Using UART and I2C together

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

cross mob
Anonymous
Not applicable

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.

0 Likes
1 Solution
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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.

   

 

   

Bob

View solution in original post

0 Likes
1 Reply
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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.

   

 

   

Bob

0 Likes