1. Set SIdata = 1.
2. Write the desired motor parameters into the corresponding registers (address 0x20:0x2B) (see I 2 C Serial
Interface).
3. Write 1011 0110 (0xB6) to enProgKey in the DevCtrl register.
4. Ensure that V CC is at or above 22 V.
5. Write eeWrite = 1 in EECtrl register to start the EEPROM programming.
The programming time is about 24 ms, and eeWrite bit is reset to 0 when programming is done.
严格按着这个流程来操作的,读出来就是与写进去的不同
/**********************PROGRAM_writeDRV10983_75eePromRegs******************************/
/* The procedure for programming the EEPROM is as follows.
* TI recommends to perform the EEPROM programming without the motor spinning, ]
* power cycle after the EEPROM write, and read back the EEPROM to verify the
* programming is successful.
*
* 1. Set SIdata = 1.
* 2. Write the desired motor parameters into the corresponding registers
* (address 0x20:0x2B) (see I2C Serial Interface).
* 3. Write ?10110110? (0xB6) to enProgKey in the DevCtrl register.
* 4. Ensure that VCC is at or above 22 V.
* 5. Write eeWrite = 1 in EECtrl register to start the EEPROM programming.
*
* The programming time is about 24 ms, and eeWrite bit is reset to 0 when programming is done.
*/
void PROGRAM_writeDRV10983_75eePromRegs(void)
{
I2C_SetSlaveAddress(DRV10964_address);
if(DRV10983_75_supplyVoltage() == 1)
{
DRV10983_75_setSIData();
DRV10964_massWrite();
DRV10983_75_starteePromProgramming();
}
}
移植官方的code,,都是正确流程