CY8C4248LQI-BL553 Just place analog component (Opamp, ADC...) on schematic stop I2C function

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

cross mob
AkFu_2553776
Level 3
Level 3
10 replies posted 5 replies posted Welcome!

I'm updating project file from CYBLE-224110-00 to CY8C4248LQI-BL553. Since the original module become discontinue.

Then I saw several issues,  such as BLE Start, Stop then Start cause stack CPU. I2C some time works, some time not works.

If sleep function exist, cannot discover characteristic from CySmart...

So I started from scratch.

I just place I2C component and send some command,it worked.

But just add Opamp and ADC without calling start function for them, cause I2C communication problem after start I2C around 1ms seems like working but all of the sudden I2C stop sending command, even while sending 1 packet length(expected 9clocks for 1 packet but 7clocks for last transaction).

Place only OpAmp or ADC also cause same behavior.

The main code is very simple like this.

#include "project.h"

#define TIMEOUTVALUE    (10)

/* simply write two byte of datas to slave */

void i2cWrite(uint8 slaveAddress,uint8 cmd, uint8 data)

{

    uint8 i2c_timeout = TIMEOUTVALUE;

    I2C_I2CMasterSendStart(slaveAddress,I2C_I2C_WRITE_XFER_MODE,i2c_timeout);

    I2C_I2CMasterWriteByte(cmd,i2c_timeout);

    I2C_I2CMasterWriteByte(data,i2c_timeout);

    I2C_I2CMasterSendStop(i2c_timeout);

    I2C_I2CMasterClearStatus();

}

#define TEMPSENSOR_ADDRESS  (0x48)

int main(void)

{

    //Opamp_1_Start();

    CyGlobalIntEnable;

    I2C_Start();

    for(;;){

              i2cWrite(TEMPSENSOR_ADDRESS,0x01,0x00);

             }

}

I attached project file both working and non working. Also logic analyzers result for I2C communication. 2019-12-20_10h16_42.jpg is from WorkspaceI2CNotWorking.zip,2019-12-20_10h14_29.jpg is from WorkspaceI2CWorking.zip.
How can I avoid this issue?

0 Likes
1 Solution

Hi Yugandhar.

I found the issue was caused by ECO's external capacitors which is I didn't notice these are not required for this device.

Removed them made the CY8C4248's firmware work stably.

Thanks,

Aki

View solution in original post

0 Likes
3 Replies
Yugandhar
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 5 likes given

Hello,

At my end, the project is working fine where I'm able to send the I2C commands to the slave device (added Opamp without calling start function in the project).

Could you please check with the 'I2C_Master_Low_Level' code example project in the PSoC Creator and let us know if you have any issues ?

Thanks,
P Yugandhar.

0 Likes

Hi Yugandhar.

I found the issue was caused by ECO's external capacitors which is I didn't notice these are not required for this device.

Removed them made the CY8C4248's firmware work stably.

Thanks,

Aki

0 Likes

This case is resolved. Please close.

Thanks,

Aki

0 Likes