DS3234 real time clock start-up problems

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

DS3234 real time clock start-up problems

Jump to solution
1,015 Views
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.

Labels (1)
Tags (1)
0 Kudos
1 Solution
688 Views
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.

View solution in original post

0 Kudos
1 Reply
689 Views
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 Kudos