questions about example project for spi

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

questions about example project for spi

ソリューションへジャンプ
1,283件の閲覧回数
zhaoyanling
Contributor III

Dear expert

I used S32K144 EVM board , and the SDK version is S32SDK_S32K1xx_RTM_3.0.0.

The example lpspi_transfer work abnormally.

The EVB power is 12V, and I connect the PTB4 (output of mater spi_0) with PTD1(input of slave spi_1), and PTE1(input of master spi_0) with PTD2(output of slave spi_1).

slaveDataSend, masterDataReceive, masterDataSend, slaveDataReceive are initialized as 0x00.

But after the ADC voltage is sampled, the slaveDataSend is 0xc3, but masterDataReceive is 0ff. When slaveDataSend changes as ADC voltage, but the masterDataReceive is always 0xff.

It means the master SPI can not receive correctly. What may be the reason? Could you help me

 

Thank you very much!

 

1 解決策
1,217件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hello zhaoyanling@bhap.com.cn,

I just tested the lpspi_transfer_s32K144 SDK example (RTM 3.0.2, S32DS for ARM 2.2)

And it seems that the pin wiring description in main.c does not match the actual PIN configuration.

pastedImage_2.png

pastedImage_3.png

Please connect PTB2 to PTB14.

Thank you,

BR, Daniel

元の投稿で解決策を見る

2 返答(返信)
1,218件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hello zhaoyanling@bhap.com.cn,

I just tested the lpspi_transfer_s32K144 SDK example (RTM 3.0.2, S32DS for ARM 2.2)

And it seems that the pin wiring description in main.c does not match the actual PIN configuration.

pastedImage_2.png

pastedImage_3.png

Please connect PTB2 to PTB14.

Thank you,

BR, Daniel

1,217件の閲覧回数
zhaoyanling
Contributor III

Hallo Deniel,

I tried as your suggestion. It works.

Thank you very much!

Best Regards.Wish you happy!

0 件の賞賛
返信