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.

MCF8316A: Is the EEPROM essentially One Time Programmable (OTP)?

Part Number: MCF8316A

I programmed the MCF8316 on the board I designed by connecting the i2c from the EVM and using the GUI.  Now I am trying to change a few parameters.  I change them in the GUI, press "Write to EEPROM", I get a message saying the EEPROM write was successful.  I power down the system, power it back up, restart the GUI and read all registers.  None of the changed parameters are there.  All the original parameters are still there.

There is a cryptic statement in the datasheet on under 7.6.1 EEPROM Access:

"EEPROM can be written and read using the I2C serial interface but erase
cannot be performed using I2C serial interface."

Does this mean it is OTP?

Thanks,

Dave Gustavson

  • Hi David,

    The EEPROM is not OTP, the EEPROM is able to be rewritten multiple times. 

    After writing to the EEPROM and getting the write successful message but before power cycling the device, are you able to change the register data using the GUI, select read EERPOM and see the registers update with the information that was written to the EEPROM?

    Also, which registers are you trying to save to EEPROM?

    Regards,

    Joshua

  • Hi Joshua,

    I am out of the office right now, so I can't try reading the EEPROM back.  I am pretty sure I did try reading it back, but I didn't change the register first.  (I think the register was still set to the new value I am trying to write.)

    I am trying to change the closed loop accel value.  Register 0x88, bits 25-29.

    Can you think of any reason the EEPROM write would not work?

    Thanks,

    Dave Gustavson

  • Hi David,

    At the moment my best guess is that the device did not receive the EEPROM write command correctly due to some I2C communication issue. Please try and read the EEPROM once more to validate if the EEPROM is being written to correctly and only read and write to the EEPROM when the algorithm is in the MOTOR_IDLE state.

    Can you also tell me which version of Motor Studio you are using?

    Regards,

    Joshua

  • Hi Joshua,

    I think I've stepped on this booby trap before.  The EEPROM write doesn't work unless the motor is stopped.  When the EEPROM is blank, the motor isn't trying to run.  I program it to run as soon as power is applied, in a standalone application.  I basically want this to behave like a brushed motor; apply power, it goes at a speed determined by the supplied voltage.

    So, after it is programmed, it is trying to run the motor, and the EEPROM write doesn't work.

    7.6.1:

    "MCF8316A allows EEPROM write and read operations only when the motor is not spinning."

    Unfortunately, the datasheet doesn't say how to stop the motor.  Disconnecting it doesn't work.  After some digging, I stumbled on register 0xEC.  You have to write a 0x80000000 to this register.  Now the EEPROM write works.

    I am using version 1.1.9 of the GUI, which I think is the latest.  I would suggest an improvement.  It should never report the EEPROM write is successful when it wasn't.  Full stop.  Better yet, save the contents of register 0xEC, automatically write 0x80000000 to it when writing the EEPROM, and then restore the contents of the register when finished.

    Thanks,

    Dave Gustavson