help!.MKE16F256vll16: LPI2C cant't work.

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

help!.MKE16F256vll16: LPI2C cant't work.

1,167件の閲覧回数
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,074件の閲覧回数
jingpan
NXP TechSupport
NXP TechSupport

Hi,

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

Regards,

Jing

0 件の賞賛
返信