CapSense Initialization Failure using Modus Toolbox

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

cross mob
raya_4824241
Level 1
Level 1
10 sign-ins 5 sign-ins First like received

I am using Modus Toolbox 2.2 with the PSoC 6 WiFi-BT Pioneer Kit.  I can get the CapSense examples working on their own, but when I tried to use CapSense with the sensor-motion-bmi160 example - the CapSense initialization fails.  I suspect that it is because the CapSense is using cyhal_ezi2c and the bmi160 is using cyhal_i2c.  Is there an example of these sensors working together?

Thanks,

Ralph

0 Likes
1 Solution
Hari
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi @raya_4824241

 

The error is caused because you are trying to allocate two resources to the same pin. There are 2 ways to solve this:

1. You can use a different set of I2C pins (please refer to the datasheet to check the pins that can be routed to I2C) for the BMI160 and use the BSP I2C pins for CapSense tuner

2. You can remove the EZI2C part from CapSense as the only function is to run the Tuner application. Once CapSense is tuned correctly, this operation is no longer required and can be removed, thereby making room for BMI160's I2C communication.

 

Best regards, 
Hari

View solution in original post

2 Replies
Hari
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hi @raya_4824241

 

The error is caused because you are trying to allocate two resources to the same pin. There are 2 ways to solve this:

1. You can use a different set of I2C pins (please refer to the datasheet to check the pins that can be routed to I2C) for the BMI160 and use the BSP I2C pins for CapSense tuner

2. You can remove the EZI2C part from CapSense as the only function is to run the Tuner application. Once CapSense is tuned correctly, this operation is no longer required and can be removed, thereby making room for BMI160's I2C communication.

 

Best regards, 
Hari

raya_4824241
Level 1
Level 1
10 sign-ins 5 sign-ins First like received

Thanks, that makes sense.  I just removed the EZI2C and CapSense Tuner code, as that was simpler.

Works as expected now.

Ralph

0 Likes