using fsl_dspi driver for simple spi

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

using fsl_dspi driver for simple spi

Jump to solution
1,270 Views
portal127
Contributor I

Hello,

I'm new to NXP world. I have a FRDM-K28F board to evaluate the micro.

I have 2 standard SPI slave devices (with SCK, MISO, MOS and SS pins) and I want to configure the K28F as the master.

I use Keil, but the driver files for this device do not contain the fsl_spi driver. Only the fsl_dspi and fsl_qspi are present.

1. Why the standard driver is not included?

2. Can I use the device as a simple SPI master using any of this driver?

   - After googling I read that is possible, so:

   2a. What is the correct configuration? What should I watch out for?

   2b. There is an example of this use case?

Thanks in advance,

Antonio

Labels (1)
Tags (2)
1 Solution
1,033 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi antonio,

    Thank you for the interest in NXP kinetis product, I would like to provide service for you.

  Now, answer you several questions:

1. Why the standard driver is not included?

Answer:   Actually, dspi is the SPI which you need, just in the K28 MCU, the SPI module name is DSPI.

  Don't worry, you can use that dspi examples.

2. Can I use the device as a simple SPI master using any of this driver?

   - After googling I read that is possible, so:

   2a. What is the correct configuration? What should I watch out for?

   2b. There is an example of this use case?

Answer: Please refer to the official SDK code for K28, which can be downloaded from this link:

Welcome | MCUXpresso SDK Builder 

Please choose the chip as MK28, then generate the code and download it.

After you download the code, you can find the dspi sample code in folder:

\FRDM-K28F\boards\frdmk28f\driver_examples\dspi

Please try it on your side, each example have the readme.txt help you to understand it.

If you still have question about it, please kindly let me know.


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

1 Reply
1,034 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi antonio,

    Thank you for the interest in NXP kinetis product, I would like to provide service for you.

  Now, answer you several questions:

1. Why the standard driver is not included?

Answer:   Actually, dspi is the SPI which you need, just in the K28 MCU, the SPI module name is DSPI.

  Don't worry, you can use that dspi examples.

2. Can I use the device as a simple SPI master using any of this driver?

   - After googling I read that is possible, so:

   2a. What is the correct configuration? What should I watch out for?

   2b. There is an example of this use case?

Answer: Please refer to the official SDK code for K28, which can be downloaded from this link:

Welcome | MCUXpresso SDK Builder 

Please choose the chip as MK28, then generate the code and download it.

After you download the code, you can find the dspi sample code in folder:

\FRDM-K28F\boards\frdmk28f\driver_examples\dspi

Please try it on your side, each example have the readme.txt help you to understand it.

If you still have question about it, please kindly let me know.


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------