I am experiencing an issue running offset calibration on the DRV8323S. When I pull the CAL pin high, wait around 2ms for the driver internal calibration to complete, and do my own calibration by averaging 4096 ADC samples over around 122ms, and pull the CAL pin low again, the voltage at the SOx pin changes, so the offset calibration cannot remove the offset. I am using the MOSFET VDS Sense Mode, mentioned in page 44 and 45 of the datasheet.
I have attached a screenshot showing the CAL pin (CH3) and the SOA voltage (CH1). The CAL pin is pulled high around 12ms after the device is enabled, then the software calibration sequence is performed, then CAL is pulled low and the low side MOSFETs are enabled. The problem is that at this point the voltage at the SOA pin drops a bit, which causes an offset in the measured current. The SOA voltage looks "noisy", this is due to the ADC internal sampling capacitor charging up and is expected.
Entire waveform | Zoomed in on part where CAL is pulled low |
I have tried the following steps to try to resolve the issue, but with no luck:
- Using SPI to set the calibration bits
- Reading back the registers over SPI confirms the registers have been written successfully
- Set IDRIVE settings to minimum values
- Doing the calibration with the low side FETs turned on
- Doing the calibration with CAL pin low and all FETs off (effect is the same as when the CAL pin is high)
- Calibrating without Rds(on) current sensing and enabling it afterwards
- Calibrating with and without a motor connected
- Verified the VREF voltage is stable (3.30V)
- Verified VCP - VM voltage is stable (11.0V)
- Verified SNA - SHA voltage (Vds) is zero (0.0mV)
- 2 different boards both have the same issue
The shift in SOx voltage after calibration happens on all three of the CSAs.
The following commands are sent to the device via SPI before doing the calibration:
drv8323communicate(0b0001101110001000, spi_buf); // unlock registers, set gate drive current for hs
drv8323communicate(0b0010000010001000, spi_buf); // set gate drive current for ls
drv8323communicate(0b0001000000100001, spi_buf); // set 3x pwm mode, clear fault
drv8323communicate(0b0010100000000000, spi_buf); // set ocp deglitch to 2us, ocp level to 0.06v, dead time to 50ns, ocp latched fault
drv8323communicate(0b0011011111100000, spi_buf); // set rdson current sense, 40v/v csa gain
While trying to find solutions, I also noticed that the CSA calibration has more error if I shorten the 12ms delay between enabling the device and pulling the CAL pin high. Increasing the delay past 12ms does not seem to increase the calibration accuracy.
I am using BSZ0901NS MOSFETs to do the Rds(on) current sensing, in case it matters. I have verified that there is no ringing or overshoot on the gate or drain pins of the MOSFETs with 260/520mA IDRIVE setting. The Rds(on) of this MOSFET is 1.7 milliohms at 25degc, and 2.7 milliohms at 150degc, and I am planning to perform software gain compensation using on a temperature sensor.
From the tests I performed, it seems that the internal shorting of the amplifier inputs is not working properly (as it also happens when all FETs are off and the amplifier is shorted internally), which is causing this issue. Unfortunately, I have tried many workarounds which have all failed, and I can't think of any more.
Is this the root cause of the problems I am seeing, and can anyone suggest ways to fix this problem so I can properly perform offset calibration?