Bug N-1: Three bits in a register bit definition off by one. Result: writing into a reserved register and causing very strange things to happen. Three days to find .
Bug N: A set of macros converts register numbers from one number range to another (this device is sort-of compatible with a different device, but with the register numbers scaled differently. One place doesn't use the macros and thus was writing to the wrong register entirely. Two days to find.