Other Parts Discussed in Thread: DRV8701, , CSD18540Q5B, TVS3300
So far I've used mostly DRV8701 for driving DC motors. This driver works fine. This time I used DRV8703-Q1 to improve control as there is a SPI interface. Well, the elecronic works but there are strange status results when motor is accellarating rapidly. Of course speed changes with current but what does a status error of 0x22 mean? The driver definitely was not overstressed. This error is reproducible and can be cleared. Pls find below the test protocol:
mov: 1 tr: 0 br: 0 sr: 00 ccr:32 mc:242 to:0
mov: 1 tr: 0 br: 0 sr: 00 ccr:32 mc:243 to:0
mov: 3 tr: 0 br: 0 sr: 00 ccr:32 mc:345 to:1
mov: 3 tr: 0 br: 0 sr: 22 ccr:32 mc:576 to:2
reg: 22 1C 18 00 00 00 <-- registers 0-5
abort: 0x2000 b:00000000000000000010000000000000
mov: 3 tr: 0 br: 0 sr: 00 ccr:32 mc:766 to:2
reg: 00 1C 18 00 00 00
mov: 1 means motor has stopped
mov: 2 means motor runs forward
mov: 3 means motor runs backward
ccr = duty cycle [%]
mc = motor current [mA]
to = timeout occurs at 800 [ms]
This is the driver setup:
// write to register 2: unlock registers & clear errors
SPI1_WriteBuffer[0] = LOCK_REG_UNLOCK | CLR_FLT_MASK; // 0x18 & 0x01 = 0x19
SPI1_DRV8703_WriteRegister(SPI1_WriteBuffer, DRV8703_REG_CTRL2);
wait_50us();
// write to register 3: setup IDrive & dead time, disable watchdog
SPI1_WriteBuffer[0] = IDRIVE_SET | TDEAD_120ns; // 0x07 & 0x00 = 0x07
SPI1_DRV8703_WriteRegister(SPI1_WriteBuffer, DRV8703_REG_CTRL3);
wait_50us();
// write to register 4: limit SO output to 3.6V & VDS to 960mV
SPI1_WriteBuffer[0] = SO_LIM | VDS_960mV; // 0x80 & 0x70 = 0xF0
SPI1_DRV8703_WriteRegister(SPI1_WriteBuffer, DRV8703_REG_CTRL4);
wait_50us();
// write to register 5: Set Vref Voltage 100%, gain = 10V & Toff = 25us
SPI1_WriteBuffer[0] = VREF_100perc | GAIN_10V | TOFF_25us; // 0x00 & 0x00 & 0x00
SPI1_DRV8703_WriteRegister(SPI1_WriteBuffer, DRV8703_REG_CTRL5);
wait_50us();
What setting is needed to avoid error 0x22?