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

PSoC™ 4 Forum Discussions

admin_hun_main
Level 1
Level 1
10 sign-ins 5 replies posted 5 sign-ins

So, I am trying to launch a tuner for tuning the cap sense button. I am able to download programs on hardware. but when I launch it is unable to connect. I have checked the document for tuning, accordingly, I have included the EZI2C component in the project and the following code as per the doc file:

 

 

    /* Start EZI2C block */
    EZI2C_Start();
    
    /* Set up communication data buffer to CapSense data structure to 
     * expose to I2C master at primary slave address request        
     */
    EZI2C_EzI2CSetBuffer1(sizeof(CapSense_dsRam), sizeof(CapSense_dsRam),\
                         (uint8 *)&CapSense_dsRam);

 

and this also,

 

void EnterDeepSleepLowPowerMode(void)
{
    /* EZI2C_Sleep routine should be called only after on-going I2C 
    *  transaction is complete
    *  Enter critical section to lock slave state 
    */
    interruptState = CyEnterCriticalSection();
      /* Check if I2C is busy. If so, skip deep sleep until I2C is free */
    if(!(EZI2C_EzI2CGetActivity() & EZI2C_EZI2C_STATUS_BUSY))
    {
        /* Configure slave to be wakeup source */
        EZI2C_Sleep();
        
        /* Enter DeepSleep. */
        CySysPmDeepSleep();	
       
        /* WDT or any I2C communication wakes up device from deep sleep. */

        /* Configure slave for active mode operation */
        EZI2C_Wakeup();
    }

    /* Enable interrupts */
    CyExitCriticalSection(interruptState);
}

 

 But I am unable to connect:

I am attaching images of the i2c tuner software and error

Screenshot 2022-03-06 161805.jpgScreenshot 2022-03-06 162120.jpgScreenshot 2022-03-06 162509.jpg

 

Any help in this regard will be much appreciated, I would like to know what I am doing wrong here?

0 Likes
1 Solution
ncbs
Moderator
Moderator
Moderator
50 likes received 250 sign-ins 250 replies posted

Hi @admin_hun_main,

> Are you using Miniprog3? Can you make sure if P3[0] and P3[1] of PSoC device are properly connected to miniprog3?

> Make sure the I2c address, sub-address and I2C speed are properly set i.e., they need to be in accordance with the parameters set in the EZI2C component.

> Make sure you are not programming a project and attempting to open tuner from a different project.

> Ensure that you are calling CapSense_RunTuner() in your application code.

Regards,
Nikhil

View solution in original post

3 Replies
ncbs
Moderator
Moderator
Moderator
50 likes received 250 sign-ins 250 replies posted

Hi @admin_hun_main,

> Are you using Miniprog3? Can you make sure if P3[0] and P3[1] of PSoC device are properly connected to miniprog3?

> Make sure the I2c address, sub-address and I2C speed are properly set i.e., they need to be in accordance with the parameters set in the EZI2C component.

> Make sure you are not programming a project and attempting to open tuner from a different project.

> Ensure that you are calling CapSense_RunTuner() in your application code.

Regards,
Nikhil

> Ensure that you are calling CapSense_RunTuner() in your application code.

 

this was missing

0 Likes
ncbs
Moderator
Moderator
Moderator
50 likes received 250 sign-ins 250 replies posted

Hi @admin_hun_main,

Glad to know that your issue is resolved 😊

Regards,
Nikhil