...
I have populated everything necessary and rerouted the relay as per the schematic issue of placing it low side instead of high side.
When I toggle a GPIO for enabling the DRV120APWR, I notice that if it is a low or a high value of GPIO, the contacts on the relay still close. Need to still investigate this, but it seems like the relay is always pulling the output low. This is also probably a fault with the rerouting because it seems to just turn on no matter the code and just when 12V is present. Also, the LED doesnt ever turn on.
I can also hear a high pitch hum as noise from the driver → might want to adjust the resistor/cap to adjust the PWM.
So turns out, I also forgot to move the flyback diode pins, and therefore there was always a potential across the diode since it was still connected to ground. What I ended up switching for fixing the relay configuration was putting pin 3 to the 12V rail, and the pin 4 to the output of the relay driver. I then put a flyback diode directly across the leads of the relay coil, and changes the values of Rhold and Ckeep (holding current and time for initial latching sequence). I found that in some combinations of high Ckeep that the relay would fully latch, but have a constant 100% PWM thereafter. In other cases, ckeep would be lower and I would increatse Rhold and here rapid clicking of the relay and NOT a constant PWM.
It seemed like there was something going wrong with the current control loop, and the IC was not behaving as expected. I had just replaced the IC, and did not think there was something wrong with it.
After troubleshooting for a while longer, I noticed that because of having to rework the board for the proper configuration of the relay coil, I had a bunch of fly wires soldered from the relay to the board. Since the relay coil feedback was part of the current loop that was regulating the power supply, this was destroying the signal and power integrity of the feedback. I removed all the wires, and pushed the pins on the relay slightly so they would just fit into the slots of the incorrect footprint (big oof). I then fixed the routing board side for the wrong nets by cutting one of the traces and jumpering it to 12V. When I tested the relay this time, it latched and then had a constant PWM on the output! It did not go crazy either (did not latch and unlatch rapidly) so the holding current (100kohm) and the time for latching (2.2uf) was good enough.
This relay driver troubleshooting was annoying but has a good takeaway (esp because imma have to validate a whole lot of other boards) → even when prototyping, trying to stay true to the layout is important, especially when dealing with a power supply (which now that I am saying out loud, sounds obvious, big oof).