4 Replies Latest reply on Jun 26, 2018 11:47 PM by nsha

    CY8CMBR3116 Re-initialization problem

    mamata.nivalkar_3017621

      Hello,

       

      I am facing one issue with CY8CMBR3116. In my application, I am using 12 sensors instead of 16. Its working fine. Now as per my application need, I keep only 6 sensors enable during sleep mode of host controller by initializing CY8CMBR3116 and whenever host controller is wake up, I re-initialize the CY8CMBR3116 to enable 12 sensors. But it is observed that CY8CMBR3116 never get re-initialized. It keeps only 6 sensors enable and rest disable.

      So, can you please tell me why this is happening?

      Waiting for your reply.

       

      Thanks & Regards,

      Mamata Nivalkar

       

        • 1. Re: CY8CMBR3116 Re-initialization problem
          nsha

          Hi,

           

          The initialization process might be not what is expected in MBR3.

          You can refer to Section 5.2 of http://www.cypress.com/file/46366/download to configure the MBR3 controller.

          Please note that CRC check and reset of the controller need to be performed to save the new configuration. (12 buttons)

           

          If you still face any issues, please provide the configuration file and the process followed.

           

          Thanks,
          Shanmathi

          • 2. Re: CY8CMBR3116 Re-initialization problem
            mamata.nivalkar_3017621

            Hello Shanmathi,

             

            Thank you for your reply.

             

            Actually, I am following the same sequence for initialization of CY8CMBR3116 as suggested by you in previous discussion.

            The sequence I am following is as follows,

             

                • CYPRESS_CAPSENSE_DEVICE_ADD – 0x6E and All registers addresses are as mentioned in the “Capsense Controllers registers TRM” document ***

             

            Cypress_Module_Data[0] = 0x40;        /* Configure host interrupt pulse at SPO1 */

            HAL_I2C_Mem_Write(&hi2c1, CYPRESS_CAPSENSE_DEVICE_ADD, SPO_CFG_ADD, 1, &Cypress_Module_Data[0], 1, 2);

            HAL_Delay(5);/* Delay of 5mS */

             

            Cypress_Module_Data[0] = 0xFE;        /* CS2 to CS7 enable and CS0 - CS1 disable */

            Cypress_Module_Data[1] = 0x1F;        /* CS8 to CS13 enable and CS14 - CS15 disable */

            HAL_I2C_Mem_Write(&hi2c1, CYPRESS_CAPSENSE_DEVICE_ADD, SENSOR_ENABLE_ADD, 1, Cypress_Module_Data, sizeof(Cypress_Module_Data), 4);

            HAL_Delay(5);/* Delay of 5mS */

             

            Cypress_Module_Data[0] = 0xFE;        /* CS2 to CS7 FSS enable and CS0 - CS1 FSS disable */

            Cypress_Module_Data[1] = 0x1F;        /* CS8 to CS13 FSS enable and CS14 - CS15 FSS disable */

            HAL_I2C_Mem_Write(&hi2c1, CYPRESS_CAPSENSE_DEVICE_ADD, FSS_ENABLE_ADD, 1, Cypress_Module_Data, sizeof(Cypress_Module_Data), 4);

            HAL_Delay(5);/* Delay of 5mS */

             

            Cypress_Module_Data[0] = 0;            /* Disable Automatic threshold setting */

            Cypress_Module_Data[1] = 0;

            HAL_I2C_Mem_Write(&hi2c1, CYPRESS_CAPSENSE_DEVICE_ADD, DEVICE_CFG2_ADD, 1,&Cypress_Module_Data[0], 1, 2);        // Disable AUtomatic threshold setting.

            HAL_Delay(5);/* Delay of 5mS */

             

            Cypress_Module_Data[0] = FINGER_SENSITIVITY;  /* 0xFF */

            HAL_I2C_Mem_Write(&hi2c1, CYPRESS_CAPSENSE_DEVICE_ADD, SENSITIVITY_0_ADD, 1, &Cypress_Module_Data[0], 1, 2);

            HAL_Delay(5);/* Delay of 5mS */

             

            Cypress_Module_Data[0] = FINGER_SENSITIVITY; /* 0xFF */

            HAL_I2C_Mem_Write(&hi2c1, CYPRESS_CAPSENSE_DEVICE_ADD, SENSITIVITY_1_ADD, 1, &Cypress_Module_Data[0], 1, 2);

            HAL_Delay(5);/* Delay of 5mS */

             

            Cypress_Module_Data[0] = FINGER_SENSITIVITY ;/* 0xFF */

            HAL_I2C_Mem_Write(&hi2c1, CYPRESS_CAPSENSE_DEVICE_ADD, SENSITIVITY_2_ADD, 1, &Cypress_Module_Data[0], 1, 2);

            HAL_Delay(5);/* Delay of 5mS */

             

            Cypress_Module_Data[0] = FINGER_SENSITIVITY;/* 0xFF */

            HAL_I2C_Mem_Write(&hi2c1, CYPRESS_CAPSENSE_DEVICE_ADD, SENSITIVITY_3_ADD, 1, &Cypress_Module_Data[0], 1, 2);

            HAL_Delay(5);/* Delay of 5mS */

             

            Cypress_Module_Data[0] = FINGER_THRESHOLD; /* 100 */

            HAL_I2C_Mem_Write(&hi2c1, CYPRESS_CAPSENSE_DEVICE_ADD, BASE_THRESHOLD_0_ADD, 1, &Cypress_Module_Data[0], 1, 2);

            HAL_Delay(5);/* Delay of 5mS */

             

            Cypress_Module_Data[0] = FINGER_THRESHOLD; /* 100 */

            HAL_I2C_Mem_Write(&hi2c1, CYPRESS_CAPSENSE_DEVICE_ADD, BASE_THRESHOLD_1_ADD, 1, &Cypress_Module_Data[0], 1, 2);

            HAL_Delay(5);/* Delay of 5mS */

             

            Cypress_Module_Data[0] = FINGER_THRESHOLD;/* 100 */

            HAL_I2C_Mem_Write(&hi2c1, CYPRESS_CAPSENSE_DEVICE_ADD, FINGER_THRESHOLD_2_ADD, 1, &Cypress_Module_Data[0], 1, 2);

            HAL_Delay(5);/* Delay of 5mS */

             

            Cypress_Module_Data[0] = FINGER_THRESHOLD;/* 100 */

            HAL_I2C_Mem_Write(&hi2c1, CYPRESS_CAPSENSE_DEVICE_ADD, FINGER_THRESHOLD_3_ADD, 1, &Cypress_Module_Data[0], 1, 2);

            HAL_Delay(5);/* Delay of 5mS */

             

            Cypress_Module_Data[0] = FINGER_THRESHOLD;/* 100 */

            HAL_I2C_Mem_Write(&hi2c1, CYPRESS_CAPSENSE_DEVICE_ADD, FINGER_THRESHOLD_4_ADD, 1, &Cypress_Module_Data[0], 1, 2);

            HAL_Delay(5);/* Delay of 5mS */

             

            Cypress_Module_Data[0] = FINGER_THRESHOLD;/* 100 */

            HAL_I2C_Mem_Write(&hi2c1, CYPRESS_CAPSENSE_DEVICE_ADD, FINGER_THRESHOLD_5_ADD, 1, &Cypress_Module_Data[0], 1, 2);

            HAL_Delay(5);/* Delay of 5mS */

             

            Cypress_Module_Data[0] = FINGER_THRESHOLD;/* 100 */

            HAL_I2C_Mem_Write(&hi2c1, CYPRESS_CAPSENSE_DEVICE_ADD, FINGER_THRESHOLD_6_ADD, 1, &Cypress_Module_Data[0], 1, 2);

            HAL_Delay(5);/* Delay of 5mS */

             

            Cypress_Module_Data[0] = FINGER_THRESHOLD;/* 100 */

            HAL_I2C_Mem_Write(&hi2c1, CYPRESS_CAPSENSE_DEVICE_ADD, FINGER_THRESHOLD_7_ADD, 1, &Cypress_Module_Data[0], 1, 2);

            HAL_Delay(5);/* Delay of 5mS */

             

            Cypress_Module_Data[0] = FINGER_THRESHOLD;/* 100 */

            HAL_I2C_Mem_Write(&hi2c1, CYPRESS_CAPSENSE_DEVICE_ADD, FINGER_THRESHOLD_8_ADD, 1, &Cypress_Module_Data[0], 1, 2);

            HAL_Delay(5);/* Delay of 5mS */

             

            Cypress_Module_Data[0] = FINGER_THRESHOLD;/* 100 */

            HAL_I2C_Mem_Write(&hi2c1, CYPRESS_CAPSENSE_DEVICE_ADD, FINGER_THRESHOLD_9_ADD, 1, &Cypress_Module_Data[0], 1, 2);

            HAL_Delay(5);/* Delay of 5mS */

             

            Cypress_Module_Data[0] = FINGER_THRESHOLD;/* 100 */

            HAL_I2C_Mem_Write(&hi2c1, CYPRESS_CAPSENSE_DEVICE_ADD, FINGER_THRESHOLD_10_ADD, 1, &Cypress_Module_Data[0], 1, 2);

            HAL_Delay(5);/* Delay of 5mS */

             

            Cypress_Module_Data[0] = FINGER_THRESHOLD;/* 100 */

            HAL_I2C_Mem_Write(&hi2c1, CYPRESS_CAPSENSE_DEVICE_ADD, FINGER_THRESHOLD_11_ADD, 1, &Cypress_Module_Data[0], 1, 2);

            HAL_Delay(5);/* Delay of 5mS */

             

            Cypress_Module_Data[0] = FINGER_THRESHOLD;/* 100 */

            HAL_I2C_Mem_Write(&hi2c1, CYPRESS_CAPSENSE_DEVICE_ADD, FINGER_THRESHOLD_12_ADD, 1, &Cypress_Module_Data[0], 1, 2);

            HAL_Delay(5);/* Delay of 5mS */

             

            Cypress_Module_Data[0] = FINGER_THRESHOLD;/* 100 */

            HAL_I2C_Mem_Write(&hi2c1, CYPRESS_CAPSENSE_DEVICE_ADD, FINGER_THRESHOLD_13_ADD, 1, &Cypress_Module_Data[0], 1, 2);

            HAL_Delay(5);/* Delay of 5mS */

             

            Cypress_Module_Data[0] = CYPRESS_REFRESH_INTERVAL;/* 3 - 60mS refresh interval */

            HAL_I2C_Mem_Write(&hi2c1, CYPRESS_CAPSENSE_DEVICE_ADD, REFRESH_CONTROL_ADD, 1, &Cypress_Module_Data[0], 1, 2);

            HAL_Delay(5);/* Delay of 5mS */

             

            Cypress_Module_Data[0] = 0x9E;        /* Write button hysteresis value and enable overwrite */

            Cypress_Module_Data[1] = 0x00;

            HAL_I2C_Mem_Write(&hi2c1, CYPRESS_CAPSENSE_DEVICE_ADD, BUTTON_HYS_ADD, 1, &Cypress_Module_Data[0], 1, 2);

            HAL_Delay(5);/* Delay of 5mS */

            /*Reset The Cypress Capsense IC */

            Cypress_Module_Data[0] = 0x03;        /* Send calculate CRC command */

            Cypress_Module_Data[1] = 0x00;

            HAL_I2C_Mem_Write(&hi2c1, CYPRESS_CAPSENSE_DEVICE_ADD, CNTRL_CMD_ADD, 1, &Cypress_Module_Data[0], 1, 2);

            HAL_Delay(5);/* Delay of 5mS */

             

            Cypress_Module_Data[0] = 0x00;        /* Read the calculated CRC value */

            Cypress_Module_Data[1] = 0x00;

            HAL_I2C_Mem_Read(&hi2c1, CYPRESS_CAPSENSE_DEVICE_ADD, CALC_CRC_ADD, 1, Cypress_Module_Data, 2, 4);

            HAL_Delay(5);/* Delay of 5mS */

             

            HAL_I2C_Mem_Write(&hi2c1, CYPRESS_CAPSENSE_DEVICE_ADD, CONFIG_CRC_ADD, 1, Cypress_Module_Data, 2, 4);//Write the CRC value to control register */

            HAL_Delay(5);/* Delay of 5mS */

             

            Cypress_Module_Data[0] = 0x02;        /* Save the configuration data to non-volatile memory */

            Cypress_Module_Data[1] = 0x00;

            HAL_I2C_Mem_Write(&hi2c1, CYPRESS_CAPSENSE_DEVICE_ADD, CNTRL_CMD_ADD, 1, &Cypress_Module_Data[0], 1, 2);

            HAL_Delay(220);/* Delay of 220mS */

             

            Cypress_Module_Data[0] = 0x00;        /* Read the control command status register to check whether configuration is saved successfully */

            Cypress_Module_Data[1] = 0x00;

            HAL_I2C_Mem_Read(&hi2c1, CYPRESS_CAPSENSE_DEVICE_ADD, CNTRL_CMD_STATUS_ADD, 1, Cypress_Module_Data, 1, 2);

            HAL_Delay(10);/* Delay of 10mS */

             

            Cypress_Module_Data[0] = 0xFF;        /* Issue the reset command once the configuration data saved successfully */

            Cypress_Module_Data[1] = 0x00;

            HAL_I2C_Mem_Write(&hi2c1, CYPRESS_CAPSENSE_DEVICE_ADD, CNTRL_CMD_ADD, 1, &Cypress_Module_Data[0], 1, 2);

            HAL_Delay(300);/* Delay of 300mS */

            /* Read the values written to Cypress IC registers */

            Cypress_Module_Data[0] = 0x00;        /* Check written data is saved */

            Cypress_Module_Data[1] = 0x00;

            HAL_I2C_Mem_Read(&hi2c1, CYPRESS_CAPSENSE_DEVICE_ADD, BUTTON_HYS_ADD, 1, Cypress_Module_Data, 1, 2);

            HAL_Delay(10);/* Delay of 10mS */

             

            If any thing is missing in this sequence, please let me know.

             

            Thanks & Regards,

            Mamata Nivalkar

            • 3. Re: CY8CMBR3116 Re-initialization problem
              mamata.nivalkar_3017621

              Hello nsha

               

              Is there any update on my previous email?

               

              Thanks & Regards,

              Mamata Nivalkar

              • 4. Re: CY8CMBR3116 Re-initialization problem
                nsha

                Hi Mamata,

                 

                The sequence seems to be correct.

                However, I see that you have mentioned you are disabling CS0, CS1, CS14, CS15 in your comments.

                But you have actually disabled CS0, CS13, CS14, CS15. Same goes for FSS too. Please check this and disable the sensors according to your application.

                 

                In your host controller, confirm if you are checking if ACK is received from MBR3 slave for each command sent and if NACK is received, confirm if you are resending the same command until ACK is received.

                 

                Please provide scope shots of the I2C lines (SDA and SCL, preferably using protocol analyzer) while you are sending these commands, to debug further.

                 

                Could you also try sending the following commands using Bridge control panel and let me know the updates?

                Bridge control Panel software: http://www.cypress.com/documentation/software-and-drivers/psoc-programmer-archive

                 

                r 6E x p [delay=5] +

                r 6E x p [delay=5] +

                r 6E x p [delay=5] +

                w 6E 4C 40 p [delay=5] +

                w 6E 00 FE 1F p [delay=5] +

                w 6E 02 FE 1F p [delay=5] +

                w 6E 4F 00 00 p [delay=5] +

                w 6E 08 FF p [delay=5] +

                w 6E 09 FF p [delay=5] +

                w 6E 0A FF p [delay=5] +

                w 6E 0B FF p [delay=5] +

                w 6E 0C 64 p [delay=5] +

                w 6E 0D 64 p [delay=5] +

                w 6E 0E 64 p [delay=5] +

                w 6E 0F 64 p [delay=5] +

                w 6E 10 64 p [delay=5] +

                w 6E 11 64 p [delay=5] +

                w 6E 12 64 p [delay=5] +

                w 6E 13 64 p [delay=5] +

                w 6E 14 64 p [delay=5] +

                w 6E 15 64 p [delay=5] +

                w 6E 16 64 p [delay=5] +

                w 6E 17 64 p [delay=5] +

                w 6E 18 64 p [delay=5] +

                w 6E 19 64 p [delay=5] +

                w 6E 52 03 p [delay=5] +

                w 6E 1D 9E 00 p [delay=5] +

                w 6E 86 03 p [delay=5] +

                w 6E 94 r 6E x x p [delay=5] + ; x = D3 01

                w 6E 7E D3 01 p [delay=5] +

                w 6E 86 02 p [delay=220] +

                w 6E 88 r 6E x p [delay=10] + ; x = 01

                w 6E 86 FF p [delay=300] +

                w 6E 00 r 6E x x p [delay=10] ; x = FE 1F

                 

                Thanks and regards,
                Shanmathi