[U-Boot-Users] External RTC in MPC860P (i2c - rtc DS1307)
Wolfgang Denk
wd at denx.de
Wed May 10 15:32:09 CEST 2006
In message <20060510122158.47635.qmail at web36907.mail.mud.yahoo.com> you wrote:
>
> We are interfacing external RTC DS1307 in MPC860P(40MHz core frequency).
> I've configured the following files in U-boot-1.1.3.
Why are you using old code?
> 1. In i2c.c
You should never have to modify this file.
> #define CFG_I2C_SLAVE 0xFE
...
> 2. In include/configs/BOARD.h
...
> #define CFG_I2C_SLAVE 0x7F
SO what is your slave address? 0xFE or 0x7F ?
> #define CONFIG_HARD_I2C 1
Makes not much sense to me. I prefer to use soft-I2C.
> 3. In <board/board.h>
...
> #define CONFIG_HARD_I2C 1
> #define CFG_I2C_SPEED 50000
> #define CFG_I2C_SLAVE 0xFE
And yet another set of definitions?
Do NOT do this.
> Is the above things correct in order to get the date and time
> up and running in an MPC860P based custom board.
No, this is NOT correct. You must not define the same things in
several place, and differently. Use a single definition in your board
config file, and make sure it is correct.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Ill-chosen abstraction is particularly evident in the design of the
ADA runtime system. The interface to the ADA runtime system is so
opaque that it is impossible to model or predict its performance,
making it effectively useless for real-time systems.
- Marc D. Donner and David H. Jameson.
More information about the U-Boot
mailing list