Other Parts Discussed in Thread: MCF8316D, MCF8315C
Tool/software:
Hi,
I have a device that is ready for production and is starting to be manufactured. We are observing issues with programming of the MCF8316A's EEPROM over I2C for new devices coming from manufacturing. I am changing ~18 registers from address 0x80-0xAE. I have recently changed our main micros logic match the datasheet; Read back all of the motor drivers registers, then write to the ones that are incorrect in order from 0x80-0xAE, to match the datasheets recommendation. I am using PWM speed signal but am not allowing any non-zero speed input until the motor driver register writes are complete. I have added built in "busy waits" to do nothing in between the read and write sequences as seen below. Is this sequence an incorrect /correct interpretation of the datasheet? Are there any recommendations to this? The latest device we received had incorrectly programmed registers 0x8C and 0x8E, which is unexpected due to them being in the middle.
- Write 0x20000000 to 0xEA
- Wait 100ms for EEPROM to load into shadow registers
- Read each register from 0x80-0xAE, with a 1 millisecond delay between reads
- Wait 1 millisecond
- Compare read values to our desired register values, and write desired values starting at 0x80-0xAE with a 1 millisecond delay between writes.
- Write 0x8A500000 to 0xEA
- Wait 150ms before sending a speed via PWM.
Thanks,
Mason