questions about example project for spi

cancel
Showing results for 
Search instead for 
Did you mean: 

questions about example project for spi

Jump to solution
173 Views
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 Solution
107 Views
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

View solution in original post

2 Replies
108 Views
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

View solution in original post

107 Views
zhaoyanling
Contributor III

Hallo Deniel,

I tried as your suggestion. It works.

Thank you very much!

Best Regards.Wish you happy!

0 Kudos