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.

TM4C1294KCPDT: Reading DRV8860 Fault Register

Part Number: TM4C1294KCPDT
Other Parts Discussed in Thread: DRV8860

Hi, 

   I am using TM4C1294KCPDT coustom board  interfacing DRV8860 to control outputs . Here I can Control my output pins through DRV 8860 Write command .But I couldnt read fault register . Is there any mistake please correct me.

DRV_Special_Command(1,2,2,3);
on(0xf0);
SysCtlDelay(1000);

DRV_Special_Command(1,2,4,3);
SysCtlDelay(1000);


DRV_Special_Command(1,4,4,3);
DRVRead();
SysCtlDelay(1000);

DRV_Special_Command(1,4,2,3);
DRVRead();
SysCtlDelay(1000);
off(0xff);


void DRVRead()
{

unsigned char x;
DRV8860_clk_High
DRV8860_Latch_High
DRV8860_clk_Low
DRV8860_Latch_Low
DRV8860_clk_High;
DRV8860_Latch_High

for(x=0;x<8;x++)
{
DRV8860_clk_High
SysCtlDelay(130);
DRV8860_clk_Low
SysCtlDelay(110);
fault <<= 1;
if( GPIOPinRead(GPIO_PORTD_BASE, 0))
fault |= 1;

}


SysCtlDelay(110);

}

void DRV_Special_Command(uint8_t part1,uint8_t part2, uint8_t part3, uint8_t part4)
{

uint8_t i;

DRV8860_Latch_High
DRV8860_clk_Low
DRV8860_Latch_Low
for (i = 0; i < part1; i++)
{
DRV8860_clk_High
DRV8860_clk_Low

}
DRV8860_Latch_High

DRV8860_Latch_Low
for (i = 0; i < part2; i++)
{
DRV8860_clk_High
DRV8860_clk_Low
}
DRV8860_Latch_High

DRV8860_Latch_Low
for (i = 0; i < part3; i++)
{
DRV8860_clk_High
DRV8860_clk_Low
}
DRV8860_Latch_High

DRV8860_Latch_Low
for (i = 0; i < part4; i++)
{

DRV8860_clk_High
DRV8860_clk_Low
}
DRV8860_Latch_High
}

Thanks in advance.

Regards,

Rani