MPC5748G SPI write/read SDK function

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

MPC5748G SPI write/read SDK function

355 Views
kimdukyu
Contributor II

Hi.

I am using SPI example program with version S32_SDK_S32PA_RTM_3.0.3.
If you look at the API, there is no write/read function, and write/read is performed at once with the transfer function.
I want to write write and read separately, but I wonder if there is a corresponding API.
If not, please answer how to implement it.

Thank you.

0 Kudos
Reply
1 Reply

342 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi Dukyu,

it's the nature of SPI interface. While SPI master sends data to slave device, the slave device always sends data back to the master at the same time. So, there's no API for separate operations.

The only workaround is:

- if you want to only send something from master to slave, ignore the data which are send back by slave

- if master device is required only to read something from slave, send some dummy data to slave, so the master will generate clocks needed to clock the data out from the slave

Regards,

Lukas

0 Kudos
Reply