I am using the K60N512 as a slave device in my project. I am using the IAR development platform. I am using the K60 tower for initial development. I am in the process of getting Interrupt enabled SPI drivers for the K60 and I have looked at MQX 3.7 SPI drivers. (spi_int_dspi.c, spi_int.c). I was also given drivers from the MCF5445. The drivers from the MCF5445 only work with a single SPI interface and they are written for master. Therefore I think my approach will need to utilize the MQX files. We do not want to integrate the MQX into our build so I will have to take these low level driver files files and modify them to work with our interface. When I looked at these files I also believe these are written for master SPI as well. Does anyone know if slave code exists or if there may be a better approach? I am new to SPI and MQX.
Solved! Go to Solution.
Hello,
the slave mode is also supported for the DSPI. The difference in the code is basically just in clock generation and chip select handling. Use IO_IOCTL_SPI_SET_TRANSFER_MODE with SPI_DEVICE_SLAVE_MODE to switch to slave mode.
PetrM
Hello,
the slave mode is also supported for the DSPI. The difference in the code is basically just in clock generation and chip select handling. Use IO_IOCTL_SPI_SET_TRANSFER_MODE with SPI_DEVICE_SLAVE_MODE to switch to slave mode.
PetrM