RTC and sleep functionality problem

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi,

i am working currently with  cyble-222014-01 module.i am using the internal  RTC. I wanted to put the system in sleep mode .but the system is

not in sleep mode because  for rtc updation i am using the system timer API's to update the RTC

CySysTickStart();

    /*config Systick Timer to Generate interrupt every 100ms*/

    CySysTickSetReload(SYSTICK_RELOAD);

    /*Find unused Callback Slot*/

    for (loop_count = 0u; loop_count <CY_SYS_SYST_NUM_OF_CALLBACKS; ++loop_count)

    {

        if (CySysTickGetCallback(loop_count) == NULL)

        {   /*Set Callback */

            CySysTickSetCallback(loop_count,SysTickIsrHandler);

            break;

        }

     }

so,due to this my ble is not in sleep mode ,it is always in on state only  if i disable the system tick  then the sleep working   but the RTC is not updating

i want Auto update of RTC and sleep mode also enable.

Please give suggestions to resolve the issue.

Thanks in adavance

0 Likes
4 Replies
Anonymous
Not applicable

how to make ble RTC auto update  without calling the   RTC_Update()    API.

0 Likes
Anonymous
Not applicable

I think the component's datasheet defines that you have to call the update function to update the time

0 Likes
Anonymous
Not applicable

Change the RTC update API to be called/initiated from an interrupt request, then set the interrupt to a timer that runs while sleeping. The device will then go to sleep, get interrupted by the timer, wakeup, update the RTC, and then can go back to sleep if needed.

The PSoC Creator should have plenty of timer examples you can use if you create and example project for a timer or interrupts.

0 Likes
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

Here is the sleep chart so you can see what devices are on in which sleep mode you selected. sleep.PNG

0 Likes