Hello,
I have an MCT8316A motor driver that I'm controlling with a PIC32MM microcontroller over I2C. I'm trying to write the EEPROM with the default configuration that appears in the datasheet. The configuration is the following:
To achieve that, I'm writing each register as detailed in section "8.6.2 I2C Serial Interface" of the datasheet. For example, for writing the shadow register corresponding to ISD_CONFIG with the data 0x6EC4C100 I'm sending the following over I2C:
Note that there's a 100us delay between each byte transaction, as suggested by the datasheet. Please confirm if this I2C command is correct. I'm repeating the same procedure for all the rest of the shadow registers.
Once I finish with that, I write the value 0x80000000 into the register 0x0000E6, in order to transfer the shadow registers into the EEPROM. This is the I2C transaction corresponding to that command:
After this, I simply wait for several seconds and turn the power off. Then, I power the driver again, and I read the EEPROM.
In order to read the EEPROM I write the value 0x40000000 into register 0x0000E6. This is the I2C transaction corresponding to that command:
After that, I wait for 200ms and then I start reading each of the shadow registers.
For reading each of the shadow registers I execute the following I2C transaction (example for reading the ISD_CONFIG register):
As you can see from this example, the value that I'm reading from the ISD_CONFIG register is 0x64738C20, and the expected value was 0x6EC4C100. So that means that the EEPROM is not being written with the shadow registers I configured.
Is there something wrong with my procedure?
Thanks!