FRDM-KL03Z and fsl_spi

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

FRDM-KL03Z and fsl_spi

1,165 Views
saxen
Contributor II

Hi all,

I'm using processor expert to setup a SPI connection, with the KL03 being the master.

I'm using the SPI_DRV_MasterInit function to initialize the master, and the SPI_DRV_MasterTransfer to transmit data. However, the code seems to get stuck right after I call the transfer function. Also, I can't see the sclk signal out of the pin using an oscilloscope after initialization.. Any idea on what I'm doing wrong?

 

If this can help, in the clock rate selection of the fls_spi module, in the clock path I read IRC_8MHz. Should this be the 48MHz clock as for the lpuart module?

Re: FRDM-KL03Z and debug console

 

EDIT:

It seems like the SPI_DRV_MasterIRQHandler is not being called? However, the MasterInit method should be taking care of the IRQ enable...

 

 

Thank you,

Enrico

Labels (1)
0 Kudos
Reply
2 Replies

834 Views
saxen
Contributor II

Hi all,

I've followed this

How do you use DSPI_DRV_MasterTransferData in the fsl_dspi bean?

and by adding the fsl_dspi_irq.c file to my project, the spi apparently does not get stuck anymore.

However, I still cannot see the sckl signal out of the pin using an oscilloscope. I've checked with GPIO pins and I can see them with the oscilloscope, but no the SPI pins.

I hope you can help me.

0 Kudos
Reply

834 Views
mjbcswitzerland
Specialist V

Hi Enrico

Please check out:

http://www.utasker.com/kinetis/FRDM-KL03Z.html

This supports SPI (see the nRF24L01P+ function) and will work out-of-the-box with KDS.

It is completely free for non-commerial use, and has fast-track support in this forum.

Tip for the SPI on the device:

- after configuring it, read the status register and the data register once. This should stop code getting stick when later polling for transmission to complete.

Regards

Mark

Kinetis: µTasker Kinetis support

KL03: µTasker FRDM-KL03Z support

For the complete "out-of-the-box" Kinetis experience and faster time to market

0 Kudos
Reply