- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am interfacing an ble to one led , i want to set blink the led for 1sec,it's blinking.but after 1 minute led stops working and pwm also starts working...
Even if i make my code to blink led for 1 minute ,the led blinking for 1 sec only.
please help me to resolve the issue
find the attachment
Thanks in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You are using deep sleep mode where the high frequency components do not run.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Please do not create many posts for the same issue.
I believe your problem lies with the BLE Advertisement timeout. You have it set to 30 seconds fast advertising and then afterwards 30 seconds slow advertising (See picture). Together you have a 1 minute timeout.
What happens after this 1 minute timeout? Your code has the following:
case CYBLE_EVT_GAPP_ADVERTISEMENT_START_STOP:
if(CYBLE_STATE_DISCONNECTED == CyBle_GetState())
{
Advertising_LED_Write(LED_ON);
CyBle_GappStopAdvertisement();
CySysPmHibernate();
}
So your system hibernates after one minute of advertising. While hibernating the system turns off and your Timer/PWM/WDT are going to stop working.
The solution to this problem depends on the purpose of your device.
You could turn off the timeouts in the BLE settings but your device will permanently advertise, which could use a lot of power when it is not needed.
You could add a button to start advertising again and remove the Hibernate function from the timeout.
Regards,
- 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
See timer datasheet for explanation of "Period". Must be set to 0 in your case.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
can you tell me the formula to calculate the required timeperiod.
i worked for pic controllers in that
reuired time=prescaler*period*(1/f)
in case psoc4 bles what is the formula to calculate the time period
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks for your reply sir
i made CySysPmHibernate(); as commented ,now it,s working.
once again thanks alot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
can you please tell me the formula for calculating dutycycle of PWM.
Thanks in advance.
- 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
You are using deep sleep mode where the high frequency components do not run.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks for your reply sir.
i made a lowpowerimplementation() api as commented then how device go to deep sleep mode
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content