- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm using the psoc6 dev kit for development. We have freeRTOS enabled with a couple of tasks running. The main ones are tasks for ble and CapSense. Is there a way to put the device in deep sleep mode with freeRTOS enabled?
I know the CapSense has to be woken up from deep sleep using an interrupt to poll it. We tried using the ble interrupt call back function for that. I also tried using a Watchdog interrupt to wake up the cap sense, but it doesn't seem to work. Are there any examples for psoc 6 with ble+capsense+freeRTOS+deepsleep?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi JaVe_4484771,
Please find the attached project the implements the CapSense task in Implementing BLE Multi-connection (4 Slaves) project with DeepSleep and RTOS.
The CapSense scan is implemented in two modes:
1. Fast Scan mode - > Refresh Rate is 30 ms.
2. Slow Scan mode - > Refresh rate is 200 ms
These values can be configured based on the touch response.
Device starts with the fast scan mode with refresh rate set to 30 ms. Refresh rate is set using vTaskDelay(). When there is a touch, the device stays in fast scan mode. If there is no valid touch for SCANMODE_TIMEOUT_VALUE amount of time, device enters the slow scan mode.
In the slow scan mode, the device scans for every 200 ms. If there is a valid touch, the device moves into the fast scan mode.
Please refer to the code example document available with the BLE project for implementation details of BLE.
Please test this project and let us know it works at your end.
Regards,
Bragadeesh
Bragadeesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi JaVe_4484771,
You can refer to the code example CE223508 – PSoC 6 MCU Implementing BLE Multi-connection (4 Slaves) for Deep sleep + RTOS + BLE.
You can refer to the code example CE218136 - PSoC 6 MCU E-INK Display with CapSense (RTOS) for CapSense + RTOS
https://www.cypress.com/documentation/code-examples/ce218136-psoc-6-mcu-e-ink-display-capsense-rtos
Please let us know if you find any difficulties in combining the two projects. We are happy to help.
You can also refer to the following project that has PSoC 4 based r Deep sleep + RTOS + BLE + CapSense
Free RTOS with PSoC 4 BLE - Hackster.io
Reference:
Tickless Low power features in FreeRTOS
Regards,
Bragadeesh
Bragadeesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi JaVe_4484771,
Please find the attached project the implements the CapSense task in Implementing BLE Multi-connection (4 Slaves) project with DeepSleep and RTOS.
The CapSense scan is implemented in two modes:
1. Fast Scan mode - > Refresh Rate is 30 ms.
2. Slow Scan mode - > Refresh rate is 200 ms
These values can be configured based on the touch response.
Device starts with the fast scan mode with refresh rate set to 30 ms. Refresh rate is set using vTaskDelay(). When there is a touch, the device stays in fast scan mode. If there is no valid touch for SCANMODE_TIMEOUT_VALUE amount of time, device enters the slow scan mode.
In the slow scan mode, the device scans for every 200 ms. If there is a valid touch, the device moves into the fast scan mode.
Please refer to the code example document available with the BLE project for implementation details of BLE.
Please test this project and let us know it works at your end.
Regards,
Bragadeesh
Bragadeesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The capsense only seems to work when I comment out Cy_SysPm_DeepSleep(CY_SYSPM_WAIT_FOR_INTERRUPT) in vApplicationSleep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi JaVe_4484771,
Could you please let us know how you are confirming that the CapSense is not working when in deep sleep?
I'm using the same project at my end and it is working fine. Have you modified anything in the project?
Regards,
Bragadeesh
Bragadeesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Sorry, it looks like it is working with Deep sleep. I believe led8 blinks with button1 touch. Do you know what the approximate expected current for this project should be?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi JaVe_4484771,
We're glad that the solution works at your end.
The power consumption (average) will depend on the blocks that are turned ON , how long they are turned ON and how long the system stays in deep sleep/ sleep mode (depends on application).
Therefore, we recommend you to refer to the PSoC datasheet and look for the active/ sleep / deep sleep mode power consumption to determine the actual power consumed by your device for this application.
Regards,
Bragadeesh
Bragadeesh