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.

DRV8305: nFault issue

Part Number: DRV8305
Other Parts Discussed in Thread: MOTORWARE

Hi Team,

The customer uses the F28069M+Drv8305 scheme for the control of the brushless DC motor. During control, the nFault pin of the Drv8305 is asserted low. Based on the datasheet, the problem is located by reading the value of registers 0x1,0x2,0x3 through SPI.

However, the fault field in register 0x01 changes from time to time between 0 and 1 and does not remain the same, even if no error occurs in the device. Some fields in the 0x2, 0x3 registers also have a value that changes if no error has occurred. 

1) Does the fault field of register 0x01 correspond to the state of the Drv8305 pin? If the Drv8305 pin is high, the fault field in register 0x1 is always 0. If the Drv8305 pin is low, the fault field in register 0x1 is always 1. Right? 

2) Are the values in registers 0x2, 0x3 set only if an nFault error occurs? Does it remain the same without error? 

Could you please help check this case? Thanks.

Best Regards,

Cherry

  • Hi Cherry,

    Thank you for the question. 

    1) Does the fault field of register 0x01 correspond to the state of the Drv8305 pin? If the Drv8305 pin is high, the fault field in register 0x1 is always 0. If the Drv8305 pin is low, the fault field in register 0x1 is always 1. Right?

    Yes. The 10th bit of 0x1 will be 1 if there is a fault detected. 

    2) Are the values in registers 0x2, 0x3 set only if an nFault error occurs? Does it remain the same without error?

    Yes. Since all of the bits in 0x2 and 0x3 only become 1 if a fault occurs, then if nFAULT is high they will not change. Please see section 7.6.1 for fault register details. 

    Section 7.3.8 in the datasheet gives more information on the fault conditions. Please let me know if this answers your question.

    Best,

    Eli

  • Hi Eli,

    Thank you for the support.

    Connect the nFault pin to an LED, if nFault is low, the LED will light.

    The fault field in register 0x1 should always be 0 according to the following thread, but the value read back by the customer through SPI continuously jumps between 0 and 1. 

    https://e2e.ti.com/support/motor-drivers-group/motor-drivers/f/motor-drivers-forum/1109565/drv8305-nfault-in-status-register

    What is the fastest frequency allowed to read the status of the motor through SPI? How many reads in 1 second is the maximum number? The read implementation of the DRV8305 in MotorWare has a time-out limit and if the read times out, the SPIRXEMU data is still fetched as the return value. Is the SPIRXEMU register value undefined due to a read timeout? 

    uint16_t DRV8305_readSpi(DRV8305_Handle handle,const DRV8305_Address_e regAddr)
    {
      DRV8305_Obj *obj = (DRV8305_Obj *)handle;
      uint16_t ctrlWord;
      const uint16_t data = 0;
      volatile uint16_t readWord;
      static volatile uint16_t WaitTimeOut = 0;
      volatile SPI_FifoStatus_e RxFifoCnt = SPI_FifoStatus_Empty;
    
      // build the control word
      ctrlWord = (uint16_t)DRV8305_buildCtrlWord(CtrlMode_Read,regAddr,data);
    
      // reset the Rx fifo pointer to zero
      SPI_resetRxFifo(obj->spiHandle);
      SPI_enableRxFifo(obj->spiHandle);
    
      // write the command
      SPI_write(obj->spiHandle,ctrlWord);
    
      // wait for the response to populate the RX fifo, else a wait timeout will occur
      while((RxFifoCnt < SPI_FifoStatus_1_Word) && (WaitTimeOut < 0xffff))
      {
        RxFifoCnt = SPI_getRxFifoStatus(obj->spiHandle);
    	if(++WaitTimeOut > 0xfffe)
    	{
    		obj->RxTimeOut = true;
    	}
      }
    
      // Read the word
      readWord = SPI_readEmu(obj->spiHandle);
    
      return(readWord & DRV8305_DATA_MASK);
    } // end of DRV8305_readSpi() function

    Thanks and regards,

    Cherry

  • Hi Cherry,

    Thank you for the clarification.

    The fault field in register 0x1 should always be 0 according to the following thread, but the value read back by the customer through SPI continuously jumps between 0 and 1. 

    Please have the customer read section 7.3.8.1 of the datasheet to understand when the SPI register fault bit will turn on and when the nFAULT pin will go low. The thread you linked is correct, however more extensive information can be found in the datasheet.

    What is the fastest frequency allowed to read the status of the motor through SPI? How many reads in 1 second is the maximum number?

    Please see section 6.6 in the datasheet for this information. The following table should contain all the SPI timing information needed. As the minimum SPI clock period is 100ns, the maximum clock frequency is 10MHz. 

     

    Is the SPIRXEMU register value undefined due to a read timeout?

    What is the read timeout time? Please have the customer check that they are adhering to the SPI requirements listed in the datasheet.

    Best,

    Eli