AnsweredAssumed Answered

32 Bit SPI Master Transfer on K64 using ksdk v2.0

Question asked by peterprocek on Feb 13, 2017
Latest reply on Feb 13, 2017 by xiangjun.rong



I'm using a K64 mcu which is communicating with an LTC2449 ADC via SPI. The ADC transfers 32bit frames, but the K64 seems to only have a max transfer of 16 bits per frame. How do I go about configuring the SPI device to transfer 32 bits correctly on the RX/TX lines.

My current scheme is built in freeRTOS, and sampling is done based on a PIT ISR which calls a function to do an DSPI RTOS transfer. Originally I had the master config for the spi device set up for 32 bits per frame, which I later discovered is incorrect as 16 bits is the Max. The goal was to enable the Receive FIFO Drain request and enter a DSPI ISR upon receiving 32bit ADC data and then process it.


How do I go about properly configuring a 32 bit transfer. I know it has to do with configuring essentially two 16 bit frames properly. My guess is to enable the continuous selection mode, create a half cycle delay, and send two frames. However, how do I do this when using the RTOS functions. Should I just create my own RTOS safe function that will do two 16 bit sequential transfers? Any help is greatly appreciated!