help!.MKE16F256vll16: LPI2C cant't work.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

help!.MKE16F256vll16: LPI2C cant't work.

1,169 Views
sudongshan
Contributor I

        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:

1.jpg

send function

2.jpg

error

3.jpg

0 Kudos
Reply
1 Reply

1,076 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi,

首先你能试一下read_accel_value_transfer这个demo吗。它采用polling方式,3轴加速芯片的时序也和你的时钟芯片非常相似。你只需根据你板子的情况稍许改一下就可以了。

Regards,

Jing

0 Kudos
Reply