AnsweredAssumed Answered

How to activate CS on SPI2 Kinetis

Question asked by OldNick on Oct 4, 2011
Latest reply on Dec 14, 2011 by Petr MacHala


stupid question time again folks. :robotsad:


Running the SPI master example code from the tower, and ported to my target (K20)


I have attached my SPI memory device to SPI2 (pins 144-141 on QFP), and configured the IO init to alt 2 for those pins.

(Cannot use SPI2_PCS0 because the flexbus wants that pin, so expect to use SPI2_PCS1 as a negated CS)


user config enables spi2:

fopen works, and pushes pin 144 high.


bus accesses drive clock cycles, but CS stays high forever.


RM says you con't need a callback for DSPI in Kinetis.  Polled driver seems loop from 1 to 8 looking for an appropriate CS but then skips assertion becasue callback is NULL.


Tried setting CS to 1 using IOCTL call

param = 1;

ioctl (spifd, IO_IOCTL_SPI_SET_CS, &param)


Any ideas? Documentation is as helpful as ever.