IIC communication error. SCL and SDA keeps low

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

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hi,

   

I am using a master MCU to communicate with touch board which is powered by CY8C4014LQI-422. The master uses io simulated iic and CY8C4014LQI-422 uses EZI2C. EZI2C is configured as 400Kbps and 8bits sub address. The whole system works normally. But there is a chance that IIC SCL is pulled low by CY8C4014LQI-422 and keeps low forever. There is no specific way to duplicate this issue. And I tried to reset CY8C4014LQI-422 by pulling XRES to GND. The whole system can return back to normal again. 

   

Anyone can show me why this could happen and how to deal with it? Great appreciation.

   

BTW, the Enable wakeup from deep sleep mode is checked. 

   

 

   

Best Regards

0 Likes
9 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

I cannot open your project, please use

   

Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.

   

 

   

Bob

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hi Bob,

   

Thanks for your quick response. We are very close to massive production... Please have a look.

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

On page 54 of the SCB component there are suggestions for setting the I2C interface asleep. There is shown, it has to be controlled that all I2C communication must have ceased before entering deep sleep. I would suggest you to enter something similar into your GoToSleep() routine.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Thanks Bob. I updated my GotoSleep function as datasheet requested. Hopefully this time problem will be solved. Any specific way to verify this?

   

void GotoSleep(void)
{
    unsigned char intState = CyEnterCriticalSection();
    
    if(0 == (SCB_EzI2CGetActivity() & SCB_EZI2C_STATUS_BUSY))
    {
        LED_Sleep();
        BUZZER_Sleep();
        DEBUG_LED_Sleep();
        CapSense_CSD_Sleep();
        SCB_Sleep();
        
        CySysPmDeepSleep();    
        
        CyExitCriticalSection(intState);
        SCB_Wakeup();
        CapSense_CSD_Wakeup();
        DEBUG_LED_Wakeup();
        BUZZER_Wakeup();
        LED_Wakeup();
    }
    else
    {
        CyExitCriticalSection(intState);
    }

   

}

0 Likes
Anonymous
Not applicable

BTW, I used a 4.7K pull up resistor to 3.3V. Do I need to change the resistor to 1K may be less to meet 3mA sink current?

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

Looks good, although I would have put intuitively the ExitCriticalSection before entering deep sleep to keep all interrupts active.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Hi Bob, I still find once the power consumption rise to up to 40uA when EZI2C is added and back to 1.4uA when EZI2C removed. According to SPEC the power consumption should be 2.5uA when EZI2C wakeup and WDT is on.

0 Likes
Anonymous
Not applicable

Well, that is because I wakeup system every 500ms. I can NOT exactly remember whey I still wakeup system during deep sleep. Just wondering if it OK if I remove this feature during deep sleep to save extra power.Thanks

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

I did some modification to disable periodical wakeup during deep sleep. But now it seems I can not wake up system by touching keys. Attached is the zipped project. Thanks

0 Likes