Category: Technical Stuff

Technical stuff – hardware, software, mechanical, chemical…

Raspberry Pi PCF8563 Real Time Clock (RTC)

Having recently received my Raspberry Pi, one of the first things I wanted to do was hook up a real-time clock chip I had lying around (a NXP PCF8563) and learn how to drive I2C from the BCM2835 hardware registers. Turns out it’s quite easy to do, and I think makes a useful project to learn with.

So, here are some notes I made getting it to work, initially with Chris Boot’s forked kernel that incorporates some I2C handling code created by Frank Buss into the kernel’s I2C bus driver framework.

After getting it to work with the kernel drivers, I created some C code to drive the RTC chip directly using the BCM2835 I2C registers, using mmap() to expose Peripheral IO space in the user’s (virtual) memory map, the technique I learned from Gert’s Gertboard demo software, though my code’s simpler (hopefully without limiting functionality!).

Note: Revision 2 boards require the code to access BSC1 (I2C1) rather than BSC0 (I2C0), so changes to the peripheral base address may be required, or in the case if the Linux I2C driver, a reference to i2c-1 rather than i2c-0. It should be simple enough, but I don’t want to write about things I haven’t done or tested, so a bit of extra work by the reader may be required.

Continue reading

Dell R415 R515 (11G) Random Reboots

We have Dell R415 and R515 11G servers that have been rebooting sporadically. These restarts are seemingly random, but occur at approximate intervals of 6 weeks, 2 weeks, or 2 days. The messages in the BMC/iDRAC6 system event log seem to be misreporting various hardware problems. The problem appears to have been avoided by disabling the Event Message Buffer using ipmitool, but only time will tell.

Continue reading