AnsweredAssumed Answered

help!.MKE16F256vll16: LPI2C cant't work.

Question asked by Su DongShan on May 14, 2018
Latest reply on May 16, 2018 by Jing Pan

        At first,sorry for my poor English. I used LPI2C0 module of the mke16f256 to drive DS3231 clock chip. my development environment is mdk. the driver program bases on the SDK examples.

       I've tried POLLING and DMA two methods,but both of them didn't work. the MSR register would be 0x1300(i.e. EPF=1, SDF=1,FDF=1) whenever I used LPI2C_MasterSend (polling method) or LPI2C_MasterTransferEDMA(dma method). can anybody help me? i have been in this problem one days. it almost drive me crazy. part of code as follows:

init code

send function

error

Outcomes