This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DRV8860: DRV8860 fault register operation

Part Number: DRV8860

Hi,I found that after each reset of the fault register, the first reading of the fault register was wrong, and there was a problem of shifting to the left, and the reading from the second time onwards was correct.

1. Test conditions: OUT2 remains open.
2. Test method: first reset the fault register, delay 10ms, and then read the fault register twice continuously, and repeat the operation in this way.
3. Test phenomenon: After each reset of the fault register, the data of the fault register read for the first time is shifted, and the data read for the second time is correct.
4. The test procedure is roughly as follows:

while(1)
{
drv8860.stu_fault = DRV8860_ReadFault();
drv8860.stu_fault = DRV8860_ReadFault();
Delay_ms(10);
DRV8860_Write_Special_CMD(1,2,4,3);//DRV8860_RESET_FAULT
Delay_ms(10);
}

uint16 DRV8860_ReadFault()
{
uint16 dat=0;
uint8 i;

CLK_H();
LATCH_H();
CLK_L();
LATCH_L();
CLK_H();
LATCH_H();

for (i = 0; i < 8; i++)
{
CLK_H();
CLK_L();
dat <<= 1;
if (DOUT_PIN) dat |= 1;
}

for (i = 0; i < 8; i++)
{
CLK_H();
CLK_L();
dat <<= 1;
if (DOUT_PIN) dat |= 1;
}
DRV8860_Delay();
//LATCH_L();
return dat;
}

void DRV8860_Write_Special_CMD(uint8 part1, uint8 part2, uint8 part3, uint8 part4)
{
uint8 i;

LATCH_H();
CLK_L();
LATCH_L();
for (i = 0; i < part1; i++)
{
CLK_H();
CLK_L();
}
LATCH_H();

LATCH_L();
for (i = 0; i < part2; i++)
{
CLK_H();
CLK_L();
}
LATCH_H();

LATCH_L();
for (i = 0; i < part3; i++)
{
CLK_H();
CLK_L();
}
LATCH_H();

LATCH_L();
for (i = 0; i < part4; i++)
{
CLK_H();
CLK_L();
}
LATCH_H();
}

5.The following is the first reading of the wrong data waveform

Yellow color: DOUT
Green color: CLK
Blue color: LATCH
Red color: DIN


6.The following is the correct data waveform read for the second time


7.The following is the data waveform of the reset fault register