Turning off the timers in BCM20736S

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

cross mob
legic_1490776
Level 5
Level 5
25 likes received 10 likes received First like received

For my application, I have an external RTC interrupt that I used to generate my own timing interrupts when desired.

Since I am using this, I have tried to turn off the fine and coarse timers in my application.

I did this by simply not calling the functions to set them up:

bleprofile_regTimerCb(tm_fine_timer_cb, tm_coarse_timer_cb);

and

  bleprofile_StartTimer();

the 'fine timer' value in the ble_profile_cfg structure is 1024.

Although I am not getting any callbacks (since I did not register them), when looking at the current over time I suspect that there is still a wakeup happening, that is separate from my own RTC interrupt and from other things like beacons being transmitted. The spikes only occur when the radio is active (i.e. when advertising or connected).

The following plots show the spikes.  In this plot, the RTC interrupts are marked with red arrows.  The tall blue spikes are advertisement beacons being sent (the device began advertising around 7 seconds in this plot).  The green spikes are the extra spikes I would like to get rid of, that I think might be timer wake ups.  (NOTE: the large DC offset after start of advertising can be ignored - it is caused by an LED running)

This plot is a zoom of the above showing the area near the second pair of arrows.

NOTE also in the first small spike above you can see the RTC interrupt line pull against the GPIO internal pull-up, where there is some slightly higher current draw before the clock turns on (the clock is the 400uA draw before the spike).  There is no equivalent draw in the second spike - i don't think this event is triggered by an external interrupt:

Is there anything else I need to do to prevent the application timers from firing and waking up the system?  This did not happen in the 20732 because the application timers in that version never woke up the system -- they would implicitly synchronize with the beacons or other activity.  Or is there something else that is likely to be happening that wasn't in the 20732?  When a connection is active I register for connection event notifications, but I don't think that should be causing this because it should be de-registered.

I don't know what is causing them, but I do know that the application is quite similar to the version on the 20732, but on the 20736 I get these extra spikes that don't happen on the 20732. This causes a 50% increase in power cost during advertisement.

santol

1 Solution
Anonymous
Not applicable

Hello santol and ldgirod

The 20732 and 20736 should behave in the same fashion.

pastedImage_0.png

The Red portion is the Wakeup.

At the end of your app_create(), do this:

 

int id  = emconinfo_getAppTimerId();

if ( id >= 0 )

        {

            // we are going to stop the timer.

            bleapptimer_stopAppTimer( id );

        }

 

Thanks

JT

View solution in original post

13 Replies