- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Sirs and Madams,
We are considering the low power mode of PSoC5LP.
Hibernate mode ⇔ active
Sleep mode ⇔ active
PSoC5LP repeats the above state transitions.
When the master clock of PSoC5LP is set to 68MHz (using PLL),
The operation is always stuck by the return CyPmRestoreClocks () ;.
The reproducibility of this problem is 100%.
/******** Software excerpt ********/
CyDelayUs(20);
CyPmSaveClocks();
CyPmHibernate();
CyPmRestoreClocks(); // <= Stack in this process
CyDelayUs(20);
However, when the master clock is set to 24MHz (using PLL),
This stacking problem does not occur at all.
Is Cypress aware of this issue?
Do you have a countermeasure plan?
Regards,
Solved! Go to Solution.
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I may be missing something, but when I tried with CY8CKIT-059 with the following setup it seems to be working.
schematic
I use SW1 to enter low power mode, and also exit from that mode.
LED blinks during the normal mode, and turns off in low power mode.
pins
clock settings
Tera Term output
main.c
======================
#include "project.h"
#include "stdio.h"
#define LED_ON 1u
#define LED_OFF 0u
#define STR_LEN 64
char str[STR_LEN+1] ;
void print(char *str) ;
void cls(void) ;
void splash(char *prog_name) ;
void init_hardware(void) ;
volatile int sw_flag = 0 ;
CY_ISR(sw1_isr)
{
SW1_ClearInterrupt() ;
sw_flag = 1 ;
}
int main(void)
{
init_hardware() ;
splash("5LP Repeated LowPower Test") ;
LED_Write(LED_ON) ;
for(;;)
{
if (sw_flag) {
print("Entering Low Power Mode ... ") ;
CyDelay(10) ;
CyDelayUs(20);
CyPmSaveClocks();
LED_Write(LED_OFF) ;
CyPmHibernate();
CyPmRestoreClocks(); // <= Stack in this process
CyDelayUs(20);
print("Woke Up!\n\r") ;
sw_flag = 0 ;
}
LED_Write(!LED_Read()) ;
CyDelay(500) ;
}
}
void init_hardware(void)
{
CyGlobalIntEnable; /* Enable global interrupts. */
LED_Write(LED_OFF) ;
UART_Start() ;
SW1_ClearInterrupt() ;
isr_1_ClearPending() ;
isr_1_StartEx(sw1_isr) ;
}
void print(char *str)
{
UART_PutString(str) ;
}
void cls(void)
{
print("\033c") ; /* reset */
CyDelay(20) ;
print("\033[2J") ; /* clear screen */
CyDelay(20) ;
}
void splash(char *prog_name)
{
cls() ;
if (prog_name && *prog_name) {
print(prog_name) ;
}
print(" (") ;
print(__DATE__) ;
print(" ") ;
print(__TIME__) ;
print(")\n") ;
}
======================
moto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
MaMi,
Hi. Are you setting the MASTER_CLK to 68MHz in the DWR/Clock tab or are you setting this frequency programmatically?
Len
"Engineering is an Art. The Art of Compromise."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I may be missing something, but when I tried with CY8CKIT-059 with the following setup it seems to be working.
schematic
I use SW1 to enter low power mode, and also exit from that mode.
LED blinks during the normal mode, and turns off in low power mode.
pins
clock settings
Tera Term output
main.c
======================
#include "project.h"
#include "stdio.h"
#define LED_ON 1u
#define LED_OFF 0u
#define STR_LEN 64
char str[STR_LEN+1] ;
void print(char *str) ;
void cls(void) ;
void splash(char *prog_name) ;
void init_hardware(void) ;
volatile int sw_flag = 0 ;
CY_ISR(sw1_isr)
{
SW1_ClearInterrupt() ;
sw_flag = 1 ;
}
int main(void)
{
init_hardware() ;
splash("5LP Repeated LowPower Test") ;
LED_Write(LED_ON) ;
for(;;)
{
if (sw_flag) {
print("Entering Low Power Mode ... ") ;
CyDelay(10) ;
CyDelayUs(20);
CyPmSaveClocks();
LED_Write(LED_OFF) ;
CyPmHibernate();
CyPmRestoreClocks(); // <= Stack in this process
CyDelayUs(20);
print("Woke Up!\n\r") ;
sw_flag = 0 ;
}
LED_Write(!LED_Read()) ;
CyDelay(500) ;
}
}
void init_hardware(void)
{
CyGlobalIntEnable; /* Enable global interrupts. */
LED_Write(LED_OFF) ;
UART_Start() ;
SW1_ClearInterrupt() ;
isr_1_ClearPending() ;
isr_1_StartEx(sw1_isr) ;
}
void print(char *str)
{
UART_PutString(str) ;
}
void cls(void)
{
print("\033c") ; /* reset */
CyDelay(20) ;
print("\033[2J") ; /* clear screen */
CyDelay(20) ;
}
void splash(char *prog_name)
{
cls() ;
if (prog_name && *prog_name) {
print(prog_name) ;
}
print(" (") ;
print(__DATE__) ;
print(" ") ;
print(__TIME__) ;
print(")\n") ;
}
======================
moto