FRDM-KL03Z and fsl_spi

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

FRDM-KL03Z and fsl_spi

1,579 次查看
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

标签 (1)
0 项奖励
回复
2 回复数

1,248 次查看
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 项奖励
回复

1,248 次查看
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 项奖励
回复