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.

MCF8316AEVM: Why can I2C via GUI continuously read and write EEPROM?

Part Number: MCF8316AEVM
Other Parts Discussed in Thread: MOTORSTUDIO

Hi there,

I noticed the Errata #8, that the I2C can't read registers when the motor is spinning. And I've verified this point, that once we wrote the DIGITAL_SPEED_CTRL (0xEC) to rotate the motor, the register can be written again, but neither did the motor execute the new speed command, nor did the register being read anymore. 

But through Motor Studio, the GUI, it can successively control (0xEC) and monitor the motor (0xE2, 0xE0). And it doesn't have to write 0xEA to copy between shadow register and EEPROM. Therefore, I captured the waveform of their I2C communication, as shown below. 

   

Could you please help me understand why I can't operate the EEPROM like Motor Studio? Thank you so much.

  • Hi Xizi,

    Please let me take a look at the logic captures and I'll get back to you within the next day.

    Regards,
    Eric C.

  • Hi Xizi, 

    Thanks for your post to the e2e motor drivers forum.

    Many of our team members are currently out of office for US holiday timeframe - but will be back in office by 1st week of January.

    Please anticipate a delayed response & feel free to provide additional information in the meantime.
    Best Regards,
    Andrew

  • Hi Xizi,

    Apologies for the delayed response.

    It sounds like there may be some confusion regarding to the Shadow Registers and the EEPROM.

    • Shadow Registers (located in RAM)
      • During regular device operation, the algorithm utilizes values that are stored in the shadow registers.
      • I2C commands directly write to and read from the shadow registers.
      • Copy of the EEPROM registers but located in RAM
      • Since it's RAM, the values are lost after power-cycle 
      • On power-up, the device copies the values from EEPROM registers into the corresponding shadow registers.
    • EEPROM registers
      • This memory is simply used to store the register settings across power cycle
      • Values are nonvolatile and persists across power-cycle
      • Register 0xEA must be used to write to EEPROM
      • When 0x8A500000 is written to register 0xEA, the device copies the values from the shadow registers into the EEPROM registers.
      • When 0x40000000 is written to register 0xEA, the device copies the values from the EEPROM registers into the shadow registers

    When changing settings in MotorStudio, you are directly modifying the shadow registers and changes take effect immediately. There's no need to write to the EEPROM unless you want the device to power-up with your settings.

    Based on your description, there might be a bug in your I2C write function that causes the device's I2C bus to become locked up after your initial write. Could you please use the example project in this E2E FAQ as reference to check your I2C implementation for potential bugs?

    Regards,
    Eric C.