I'm having some issues getting the BQ24163 to accept settings (specifically, choosing USB as the main supply). Here is what I'm trying to write to the device in my code:
REG 0 = 0x88
REG 1 = 0x00
REG 2 = 0x54
REG 3 = 0x70
REG 4 = 0x00
REG 5 = 0x54
REG 6 = 0x00
REG 7 = 0x40
Here is what I'm reading back after writing all of the registers:
REG 0 = 0x20
REG 1 = 0xC0
REG 2 = 0xD4
REG 3 = 0x70
REG 4 = 0x45
REG 5 = 0x54
REG 6 = 0x00
REG 7 = 0x40
As you can see, the USB was not set as the preferred supply. I've tried disabling charge via the CD pin, going into high impedance mode, disabling charging via register bit, etc. There is no voltage on the IN rail. I need this to prefer USB over IN in certain scenarios. Notice that everything else appears to be correct, except for the supply precedence. Any ideas as to what may be causing this? Below is a grab of my schematic. Thanks in advance!