32 bit SPI slave problems

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

32 bit SPI slave problems

跳至解决方案
2,010 次查看
tjunkans
Contributor II

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!

0 项奖励
回复
1 解答
1,512 次查看
tjunkans
Contributor II

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

在原帖中查看解决方案

0 项奖励
回复
6 回复数
1,512 次查看
tjunkans
Contributor II

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 :smileyindifferent:

0 项奖励
回复
1,512 次查看
tjunkans
Contributor II

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 :smileyhappy:

0 项奖励
回复
1,510 次查看
J2MEJediMaster
Specialist I

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

0 项奖励
回复
1,510 次查看
tjunkans
Contributor II

Perfect, I have a requect in. 

Thanks much. 

0 项奖励
回复
1,512 次查看
tjunkans
Contributor II

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? 

0 项奖励
回复
1,513 次查看
tjunkans
Contributor II

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

0 项奖励
回复