DS3234 real time clock start-up problems

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

DS3234 real time clock start-up problems

ソリューションへジャンプ
1,629件の閲覧回数
teegee
Contributor I

I'm writing a library to access a DS3234 real time clock via SPI from an MC9S08DZ128.

After power-on, I'm getting a lot of read errors for about 15 seconds. This means the time read from the clock registers jumps around and I'm getting inconsistent SRAM reads (I know because I get checksum errors). After those initial problems go away, the device works fine until power cycled again. The RST pin is steady high after power on.

 

I'm waiting 400ms after power on before initialising the rtc. During initialisation, I'm writing 0x00 into the control register and and I'm disabling BB32KHZ, EN32KHZ and setting CRATE to 00 in the control/status register.

Only after the initialisation I start periodically reading the time and temperature registers and allow SRAM read/writes.

 

SPI is configured with mode 3 at 1MHz baud rate.

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
1,302件の閲覧回数
teegee
Contributor I

Fixed.

The problem was another device on the same SPI bus. It's CS was connected to an unconfigured pin of the CPU, which lead to corruption on the DOUT line during start-up until the unconfigured pin settled into friendly state.

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
1,303件の閲覧回数
teegee
Contributor I

Fixed.

The problem was another device on the same SPI bus. It's CS was connected to an unconfigured pin of the CPU, which lead to corruption on the DOUT line during start-up until the unconfigured pin settled into friendly state.

0 件の賞賛
返信