Other Parts Discussed in Thread: DRV8711
Hi Team,
The customer is experiencing below issue and needs your help.
I'm using a BOOST-DRV8711 to control a stepper motor. In the very beginning, everything is ok, the register values are normal and the motor worked well. But the driver and motor failed suddenly when I tried to write the register one by one to verify the values, which will be a feedback status to a new task in the future. So, nothing changed to the current version. The initialization code of DRV8711 is similar to the ti example, which the only difference is that I designed the register classes to make the initialization easier.
/* Write all registers' value into DRV8711 */ void Driver::WriteAllReg() { uint16_t data = 0; CTRLreg.R_NW = 0; CTRLreg.Encode((uint8_t*)&data); SPI_RW(data); TORQUEreg.R_NW = 0; TORQUEreg.Encode((uint8_t*)&data); SPI_RW(data); OFFreg.R_NW = 0; OFFreg.Encode((uint8_t*)&data); SPI_RW(data); BLANKreg.R_NW = 0; BLANKreg.Encode((uint8_t*)&data); SPI_RW(data); DECAYreg.R_NW = 0; DECAYreg.Encode((uint8_t*)&data); SPI_RW(data); STALLreg.R_NW = 0; STALLreg.Encode((uint8_t*)&data); SPI_RW(data); DRIVEreg.R_NW = 0; DRIVEreg.Encode((uint8_t*)&data); SPI_RW(data); STATUSreg.R_NW = 0; STATUSreg.Encode((uint8_t*)&data); SPI_RW(data); }