- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there,
We are wondering why our LED's (red, green, and blue) constantly blink when enabling deep sleep?
In our project we currently we have 3 PWM's each driving an RGB LED and Bluetooth. The device constantly wakes up by the Bless interrupt (because of constant advertisement) and returns to deep sleep.
We have observed that taking out the Cy_SysPm_DeepSleep() API call makes the LED's stop blinking, so we think Deep Sleep is the issue.
We have tried disabling the PWM's before going to deep sleep and reenabling them on wake up, but the blinking persists. We have also attempted different drive modes for the LED's (Strong drive, Resistive Pull up, Open drain) with no success.
Could it be an issue with the clock source for the PWM's? Which clock sources can drive the PWM's (CLK_HFx doesn't seem to work)? What happens to the clocks when entering deep sleep?
Best,
Steve
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Steve,
You will need to change the HSIOM setting of the GPIO (to 0 or GPIO) before and after deep sleep (also drive mode or data value, in case the default value turns on the LED). Since PWM is an active source, it is not available in deep sleep. As a result, in deep sleep, the IO drive from the block will be disabled (which can turn ON the LED, if its active low). You can use the "Cy_GPIO_SetHSIOM" API for this.
Can you try this and let me know if the issue persists?
Regards,
Meenakshi Sundaram R
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Steve,
You will need to change the HSIOM setting of the GPIO (to 0 or GPIO) before and after deep sleep (also drive mode or data value, in case the default value turns on the LED). Since PWM is an active source, it is not available in deep sleep. As a result, in deep sleep, the IO drive from the block will be disabled (which can turn ON the LED, if its active low). You can use the "Cy_GPIO_SetHSIOM" API for this.
Can you try this and let me know if the issue persists?
Regards,
Meenakshi Sundaram R
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Msur,
This fixed the blinking LED's, thank you! We had to get the initial HSIOM setting, and set the GPIO pins to 0 before deep sleep and back to its original setting after deep sleep.
Best,
Steve