I have a Kinetis K70 board running as a 16 bit SPI slave and all is just fine. When I set it up for a 32 bit slave, the lower 16 bits get transmitted twice and the top 16 bits never get sent out.
I set up the SPIx_CTAR_SLAVE register for 32 bits "SPI2->CTAR_SLAVE[0] = 0xFC000000; //32 bits SPI" and fill the SPIx_PUSHR_SLAVE register with 32 bits but it seems to be stuck in 16 bit mode and just sends the same 16 bits twice.
Does anyone know what the heck my problem is? Any ideas are welcome!
Solved! Go to Solution.
OK, I got it. HooRay!
The K60 & K70 manuals printed in Dec of 2011 have an error.
The manual's error is the section that discribes DSPI pushr TX FIFO register in slave mode (SPIx_PUSHR_SLAVE)
The error is this line :
In slave mode all 32 register bits can be used as data, supporting up to 32-bit SPI
frame operation.
In the newer manuals the line is replaced with:
In slave mode, the 16 bit Command Field of PUSHR is reserved.
So, of course my solution is simple, simply write to the SPIx_PUSHR_SLAVE register twice with 16 bits. This loads up two 16 bit TX FIFOs, which are sent out together when configured for 32 bits.
A Field application engineer, Mike Maas helped me resolve this. Thanks a ton MIke!
Hay! how come my user name is my email address? I want it to be something cool like the rest of ya!
Cheers,
cavebiker
Are there any Freescale people out there who have run a Kinetis part in 32 bit SPI slave mode?
If not, I am convinced this is a K70 die hardware problem. Someone please prove me wrong
OK, this is getting real scary now, Freescale hasn't even weighed in.
32 bit SPI slave on a K60 or K70, anyone… I am a nice guy, really
When all else fails, file an on-line service request to get the problem looked at. Click here to go to the on-line service request page.
---Tom
Perfect, I have a requect in.
Thanks much.
Does anyone have experiance with the Freescale on-line Service request, as far as how long it takes for someone to be assigned to the request?
OK, I got it. HooRay!
The K60 & K70 manuals printed in Dec of 2011 have an error.
The manual's error is the section that discribes DSPI pushr TX FIFO register in slave mode (SPIx_PUSHR_SLAVE)
The error is this line :
In slave mode all 32 register bits can be used as data, supporting up to 32-bit SPI
frame operation.
In the newer manuals the line is replaced with:
In slave mode, the 16 bit Command Field of PUSHR is reserved.
So, of course my solution is simple, simply write to the SPIx_PUSHR_SLAVE register twice with 16 bits. This loads up two 16 bit TX FIFOs, which are sent out together when configured for 32 bits.
A Field application engineer, Mike Maas helped me resolve this. Thanks a ton MIke!
Hay! how come my user name is my email address? I want it to be something cool like the rest of ya!
Cheers,
cavebiker