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: IIC communication

Part Number: MCF8316A
Other Parts Discussed in Thread: MSP430FR2311

Hi team,

Here's an issue from the customer may need your help:

ACK signal can be received when writing (there was no code read in the code). When reading, it was NACK and then the write failed to ACK. ACK will reappear unless no read code added to the code after the reboot. Could you help check this case? Thanks.

Best Regards,

Cherry

  • Hi Cherry,

    our team will aim to follow up by early next week

    Best Regards, 
    Andrew 

  • Hi Cherry,

    Could you please provide some additional information?

    • What MCU are they using to send the I2C commands?
    • Are they using software I2C (bit-banging) or hardware I2C?
    • Would it be possible for the customer to provide their I2C code?
    • Do they have a MCF8316AEVM? If so, can they try jumper wiring the EVM's I2C signals to their custom PCB and check whether I2C write/reads work?

    Thanks,
    Eric C.

  • Hi Eric,

    Thanks for support.

    The waveform of the logic analyzer is shown below when writing and reading data:

     (Writing)

     (reading)

    With software IIC, the write should be successful because the customer tried to change the output voltage by command (3.3V, 4V, 5V all ok) but there was a problem when reading the data.

    The customer also tried to spin the motor by writing the default register data in and found that the motor only had to swing back and forth for a period of time, and the current stopped at around 150mA. The command was written to connect an external PWM signal, but the behavior was the same whether it was external or not.

    Thanks and regards,

    Cherry

  • Hi Cherry,

    Could you please help ask the customer the following questions:

    • After an I2C read results with NACKs, if they send a I2C write command without power cycling the device, does the device start ACKing or continue to NACK?
    • What MCU is the customer using? I'm attaching a working MSP430FR2311 based reference software I2C code here in case it can help:
      SoftwareI2C_MSP430FR2311_MCF8316AEVM.zip 

    I don't see 100-us inter-byte delay in the I2C write waveform. This may not be the cause of the read issue, but I'd still recommend the customer to add this 100us delay between every byte.

    When the device is programmed with default settings, the motor parameters are all 0, and the device will automatically try to run MPET to measure the parameters when a speed command is provided. When the customer saw the motor moving back & forth, it's possible that the device attempted to but failed at running MPET. To bypass MPET and give the motor a good chance of spinning up , they can try programming the motor resistance, inductance, BEMF constant manually by referring to Section 7.3.12 of the datasheet.

    Regards,
    Eric C.

  • Hi Cherry, 

    Can you let us know if the problem has been resolved? 

    Hoping Eric's suggestions were able to provide customer w/ next steps of their debug 

    Please let us know if further support is needed on this question. Thanks 

    Best Regards, 
    Andrew