How to put CY8CMBR3116 in DEEP-SLEEP state?

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

cross mob
Anonymous
Not applicable

Hi,

we're thinking about using the CY8CMBR3116 to control some capacitive buttons on one of our product.

The CY8CMBR3116 will be controlled via I2C from another MCU and I have the need to put the CY8CMBR3116 in DEEP-SLEEP state (our board is battery-powered).

To test the CY8CMBR3116 we are currently using the Cypress CY8CMBR3116 development board connected to our MCU through the compatible Arduino pinouts.

We have setup the Cypress CY8CMBR3116 development board using the EZ-Click software - we have loaded one of the default configuration files where the board is using the proximity loop and the 4 touch buttons.

As a first test, I've managed to read the whole register configuration of the CY8CMBR3116 using our MCU (the register configuration written from the EZ-Click sotware).

Then, to test the DEEP-SLEEP functionality I've coded a small firmware for my MCU that executes only these operations at boot:

#define CY8CMBR3116_ADDR  0x37

#define REG_CTRL_CMD      0x86

int main (void)

{

    unsigned char ctrl_cmd;

    // read the CTRL_CMD register

    ctrl_cmd = I2C_READ(CY8CMBR3116_ADDR, REG_CTRL_CMD);

    // As there is written on the CapSense 'Express Controllers Registers TRM'

    // The host may write this register at any time that its value is 0.

    // If the host writes to this register while its value is non-zero,

    // device response to the newly requested command is undefined.

    if (ctrl_cmd == 0)

    {

        printf("ctrl_cmd = %d [enter in deep-sleep]\n", ctrl_cmd);

        // write the command to CTRL_CMD

        I2C_WRITE(CY8CMBR3116_ADDR, REG_CTRL_CMD, 0x07);

    }

    else

    {

        printf("ctrl_cmd = %d [NOT enter in deep-sleep]\n", ctrl_cmd);

    }

    while (1)

    {

    }

}

and the log I obtain in the debug output console is:

ctrl_cmd = 0 [enter in deep-sleep]

but then if I click on the buttons on the development board, the buttons still flash the leds and the buzzer beeps... so it seems that the controller is not entering in the DEEP-SLEEP state.

As I understand from the datasheet, I cannot read the CTRL_CMD_STATUS or the CTRL_CMD_ERR registers after sending the first command, because any other I2C transaction will wakeup the CY8CMBR3116 from the deep sleep state, so I don't execute any other I2C read write operration after the CTRL_CMD write.

Another question: is it possible that there isn't any register on the CY8CMBR3116 to get the current controller state (i.e. Look-for-Touch / Look-for-Proximity... etc.)? How can I know if the CY8CMBR3116 is working correctly as expected from the configuration?

Thanks for your support.

Regards,

Samuele.

0 Likes
2 Replies
VenkataD_41
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hello Samuele,

MBR3 device will go to sleep when you write 0x07 into the control command register. After that there should not be any address match event o the bus. Please attach your entire project here to check what is actually waking up the device in your case.

Please try using Cypress' bridge control panel tool which acts as an I2C Master to write the value 0x07 into the CTRL_CMD register at your side. It is working fine and putting the device into deep sleep when I tried it. No buttons are working after the device wnet into deep sleep. This test is to check the functionality of the device.

Thanks

Ganesh

0 Likes