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

cross mob

Wake Up PSoC 6 MCU Device from Hibernate Mode Using Free Running WDT - KBA228293

lock attach
Attachments are accessible only for community members.

Wake Up PSoC 6 MCU Device from Hibernate Mode Using Free Running WDT - KBA228293

ChaitanyaV_61
Employee
Employee
50 questions asked 25 likes received 25 sign-ins

Author: LinglingG_46         Version: **

Translation - Japanese: PSoC 6 デバイスをフリーランニング WDT を使用してハイバネート モードからウェイクアップする - KBA228293 - Community Translated (JA)

Question: How to wake up PSoC® 6 MCU device from Hibernate mode using free running WDT?

Answer:

PSoC 6 has multiple watchdogs – single free running watchdog timer (WDT) and one or more multi-counter watchdog timers (MCWDT).

Only the free running WDT can wake up the device from hibernate mode.

Figure 1 shows the PSoC Creator™ 4.2 project schematic.

Figure1: Creator 4.2 Project Schematic

 
pastedImage_4.png

Perform these steps using WDT ISR to wake up the PSoC 6 device from Hibernate mode:

1. Before the PSoC 6 device enters the Hibernate mode, configure the WDT interrupt, initialize, and enable WDT.

/* Configure the WDT interrupt  */

Cy_SysInt_Init(&WDTIsr_cfg, WDTIsr);

NVIC_EnableIRQ(srss_interrupt_IRQn);

/*Initialize and enable WDT */

/*WDT interrupt period can be varied by configuring WDT_IGNOREBITS */

Cy_WDT_SetIgnoreBits(WDT_IGNOREBITS);

Cy_WDT_UnmaskInterrupt();

Cy_WDT_Enable();

2. Set the wake-up signal from Hibernate.

         Cy_SysPm_SetHibWakeupSource(MyLPComp_WakeUpSrc);

* \param MyLPComp_WakeUpSrc

* CY_SYSPM_LPCOMP0_LOW  : Wake-up source for LPComp CH0 output low

* CY_SYSPM_LPCOMP0_HIGH : Wake-up source for LPComp CH0 output high

* CY_SYSPM_LPCOMP1_LOW  : Wake-up source for LPComp CH1 output low

* CY_SYSPM_LPCOMP1_HIGH : Wake-up source for LPComp CH1 output high

* CY_SYSPM_HIBALARM     : Wake-up source for RTC alarm

* CY_SYSPM_HIBWDT           : Wake-up source for watchdog

* CY_SYSPM_HIBPIN0_LOW  : Wake-up source for Pin0 input low

* CY_SYSPM_HIBPIN0_HIGH : Wake-up source for Pin0 input high

* CY_SYSPM_HIBPIN1_LOW  : Wake-up source for Pin1 input low

* CY_SYSPM_HIBPIN1_HIGH : Wake-up source for Pin1 input high

3. Use the Cy_SysPm_Hibernate() API  to jump into Hibernate mode.

4. Use the CY8CKIT-062-BLE PSoC6 BLE Pioneer Board to test the attached project.

The attached project turns ON the green LED  (P1.1) for one second and turns off before the chip wakes up from hibernate. When the WDT interrupt happens, it will wake up the system immediately and will result in a device reset.

References:

Attachments
672 Views
Contributors