- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there,
I'm using the CY8CKIT-042-BLE pioneer kit with the PSoC 4 CY8C4247LQI-BL483 module. I'd like to use a bluetooth app to drive a PWM signal, so I'm using the Android example code "Find Me" service with the "Find Me" target as the PSoC 4 BLE. The app connects to and can send the various alerts to the PSoC 4 BLE with no problem. However, if I add a TCPWM block to the project with an input clock signal at 480kHz, the TCPWM configured with a period of 50Hz (value of 4800), and a compare value of 4400 (approximately 1.5ms), the PWM output to pin 3.4 is completely inconsistent with the TCPWM configuration. The period is around 300ms with a duty cycle of about 16%, instead of a period of 20ms and a duty cycle of 7.5%. If I create a project with only the TCPWM (and no BLE module), the TCPWM behaves exactly as expected. Are there any known issues between the BLE module and TCPWM module? I'm attaching my two projects for reference. Any help would be greatly appreciated.
Thanks,
Becky
Solved! Go to Solution.
- Labels:
-
BLE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Welcome in the forum, Becky!
In your BLE project the system switches into deep-sleep mode. This disabled the IMO from which the clock for your PWM is generated.
The PWM is not sent into sleep-mode to save the states. Have a look at the _Sleep() and _Wakeup() functions for the component you use.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Welcome in the forum, Becky!
In your BLE project the system switches into deep-sleep mode. This disabled the IMO from which the clock for your PWM is generated.
The PWM is not sent into sleep-mode to save the states. Have a look at the _Sleep() and _Wakeup() functions for the component you use.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Bob! Thanks for the warm welcome and quick response. I commented out all the BLESS sleep state code in the main execution loop (basically, everything after the switch statement that looks at the alertLevel), and the PWM works as expected. I also added PWM_Sleep() and PWM_Wakeup() functions to the StackEventHandler() when the BLE is disconnected and connected, respectively. Everything is working great now. Thanks again for your support!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You are always welcome, Becky!
Bob