6 Replies Latest reply on Nov 12, 2020 1:30 PM by CaKu_4284131

    Supercap Backup Power on CY8CKIT-062-WiFi-BT for RTC retention

    ElTr_4809176

      I have been trying to get the RTC on the CY8CKIT-062-WiFi-BT to retain time over power cycles, though with no success this far.

       

      I have found suggested solutions in these discussions which I tried to reproduce:

      Battery/Super Capacitor backup power / RTC

      VBackup and Super Cap for RTC to work

      though still had no success in getting it to work. Some of the proposed solutions refer to settings in PSoC Creator. I'm, however, using ModusToolbox. This means I had to try to recreate the (assumed) behavior of these solutions using the SysPm PDL.

       

      Starting from the RTC Basics example in MTB, here is what I tried:

      1. Comment out

                 Cy_RTC_SetDateAndTime(&defaultTime);           
                 _cyhal_rtc_set_century(_CYHAL_RTC_INIT_CENTURY);

      in cyhal_rtc_init() to prevent the clock from being reset after a power cycle

      2. Charge SuperCap using Cy_SysPm_BackupSuperCapCharge(CY_SYSPM_SC_CHARGE_ENABLE); (and pre-charged using a 100 Ohm resistor). Supercap reads 1.6V.

      3. It is suggested to change the vBackupSource to dedicated supply in the accepted answer to the first discussion. I'm not sure how to achieve the same thing using SysPm. Cy_SysPm_BackupSetSupply(CY_SYSPM_VDDBACKUP_VBACKUP); seems like the best candidate for this?

      4. Explicitly enable PMIC as suggested for PSoC Creator in one of the discussions:

           Cy_SysPm_PmicUnlock();   
           Cy_SysPm_PmicEnable();
           Cy_SysPm_PmicEnableOutput();
           Cy_SysPm_PmicLock();

      (This should be the default configuration anyway and does not change anything about the observed behaviour)

      5. Set SW7 to SuperCap position

       

      The board power seems to glitch immediately as soon as I set SW7 to the supercap position. I can only fix it by setting SW7 back to the KitProg position.

      I assume this is because the PMIC circuitry is supposed the disable Vddd on power loss but somehow shorts it to VBackup instead?

       

      The board is Rev.10, if that makes a difference.
      EDIT: Hardware Revision is actually Rev.04, not 10.

       

      Nachricht geändert durch Elias Trommer