Problems with SPI0

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with SPI0

199 Views
norbertoj
Contributor III

I'm using MQX 4.2.0, and a MK60DN512VLQ10.

I'm trying to send some information by SPI with fopen, fwrite, etc. The problem is that spi outputs are not working. There are nothing in the outputs. No Signal, nothing. I check my _bsp_dspi_io_initand it is in the right pines. I don't know if there is a configuration that aren't allow me to produce a SPI.

 

BR,

Norberto Jiménez

Original Attachment has been moved to: user_config.h.zip

0 Kudos
4 Replies

90 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Norberto:

What we need to do is the BSPCFG_ENABLE_SPIx macro must be set to 1 in the user_config.h. I noticed in your config file, this macro is set.

Do you use the TWR-K60D100M board or your custom board? and your device is a master or a slave ?

I think you need to check the connection between the master and slave first.

Here is a SPI demo in MQX installation folder, you can refer to it.

C:\Freescale\Freescale_MQX_4_2\mqx\examples\spi

Regards

Daniel

0 Kudos

90 Views
norbertoj
Contributor III

I tried to test the spi driver demo, but it stucks in mqx_idle_task and doesn't advance after the mqx table task.

0 Kudos

90 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Norberto Jiménez

Just for information, the SPI demo creates one task for spi master, which is responsible for configuring the SPI protocol, erasing memory in memory board and reading data from and writing data the the memory board. The MCU is the master and the SPI serial flash memroy is the slave in the SPI data transfer.

you need to connect your TWR-MCU board with TWR-MEM board when you test the SPI demo.

Please also check your jumper setting in your TWR-MEM board

J4:  Serial Flash Configuration options 1-2

J14:  Serial Flash Chip-select  1-2

Regards

Daniel

0 Kudos

90 Views
danielchen
NXP TechSupport
NXP TechSupport

Can you attach your debug console ?

0 Kudos