help!.MKE16F256vll16: LPI2C cant't work.

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

help!.MKE16F256vll16: LPI2C cant't work.

1,124 次查看
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 项奖励
回复
1 回复

1,031 次查看
jingpan
NXP TechSupport
NXP TechSupport

Hi,

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

Regards,

Jing

0 项奖励
回复