BCM20737S RTC clock problem

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

cross mob
KoM_2154881
Level 3
Level 3
First like received First like given

I am working with BCM20737S and we have to keep track of time. We have an external 32.768KHz crystal and everything is setup  according to the rtc_sample example. Every second I check the time using rtc_getRTCTime. The output is correct for a couple of minutes and then the clock is off by one second. I monitored the behavior of the system by printing the seconds. Bellow I have the debug log. The system gets the time from a different device and there is one second difference between the time in the

system and the PC running the debug viewer (plus the timezone difference). The difference is stable (1 second) until it reaches the point at 16:56:02. There I have for 2 different seconds the same value returned from the rtc_getRTCTime. I am not sure why this is happening. This happens after a couple of minutes after the time is synchronized and I can't see any type of periodic behavior so far.

In a thread I noticed that they were using the bleapputils_changeLPOSource(LPO_32KHZ_OSC, FALSE, 250); line to setup the crystal.

When I am using this command in the create function, I get the opposite effect, the clock is jumping a second every now and then. I am not sure if it is the driftRate wrong

and how to correctly set it up. I will disable to sleep to see if that helps but I must have the sleep enabled.

16:55:56 - 21:55:55

16:55:56 - CurrSec: 55

16:55:57 - 21:55:56

16:55:57 - CurrSec: 56

16:55:58 - 21:55:57

16:55:58 - CurrSec: 57

16:55:59 - 21:55:58

16:55:59 - CurrSec: 58

16:56:00 - 21:55:58

16:56:00 - CurrSec: 58

16:56:01 - 21:56:0

16:56:01 - CurrSec: 0

16:56:02 - 21:56:1

16:56:02 - CurrSec: 1

16:56:03 - 21:56:1

16:56:03 - CurrSec: 1

16:56:04 - 21:56:2

16:56:04 - CurrSec: 2

16:56:05 - 21:56:3

16:56:05 - CurrSec: 3

16:56:06 - 21:56:4

16:56:06 - CurrSec: 4

16:56:07 - 21:56:5

16:56:07 - CurrSec: 5

16:56:08 - 21:56:6

16:56:08 - CurrSec: 6

0 Likes
1 Solution

If an external 32KHz LPO is utilized, then it must be connected to P43 and P44 of the 20737S module. In this case, one cannot use the alternate functions of P12 and P11 respectively.

View solution in original post

4 Replies
KoM_2154881
Level 3
Level 3
First like received First like given

I am looking more into this and I have more questions. I am using the spiffy2 interface with the following configuration

MASTER2_P24_CLK_P27_MOSI_P25_MISO. Is there a conflict using P27 for SPI and the clock on P11?

The SPI and the other subsystems are working without problems. The only problem we are hunting down is the clock drift.

0 Likes

If an external 32KHz LPO is utilized, then it must be connected to P43 and P44 of the 20737S module. In this case, one cannot use the alternate functions of P12 and P11 respectively.

Thanks for your reply. That's where we have the crystal. We are using the SPI2 as well with the setup I sent above:

MASTER2_P24_CLK_P27_MOSI_P25_MISO.

I noticed in the forum that GPIO P27 (physical pin 1) is connected internally to GPIO P11. Since we have problems with out setup is it possible that there is a conflict betweeen these two setups?

Thanks.

0 Likes

I see, so the alternate function of P11 is P27. That was quite confusing. Now my problems start to make sense.

Thanks.

0 Likes