Learn MoreFAQsTutorials

6 posts / 0 new
Last post
Firefox2005
Offline
Last seen:20 hours 31 min ago
加入:2016-04-13 09:36
SPI 9-bit mode

Hi,

is it possible to add prior bit to the actual 8-bit SPI mode for the slave to indicate if the byte has to be interpreted as data or command?

它would be nice if there is a sample application. I could not find any...

Best regards

Device:
PM_Dialog
Offline
Last seen:14 hours 35 min ago
Staff
加入:2018-02-08 11:03
嗨Firefox2005,

嗨Firefox2005,

Could you please help us to understand what you want to accomplish? My apologies but it’s not clear for me what is your requirement.

谢谢,PM_Dialog

Firefox2005
Offline
Last seen:20 hours 31 min ago
加入:2016-04-13 09:36
Hi,

Hi,

thanks for your reply.

Normal SPI operation/bitflow:

D7, D6, D5, D4, D3, D2, D1, D0

Custom SPI operation/bitflow:

Special Bit, D7, D6, D5, D4, D3, D2, D1, D0

So basically I just want to transfer 9 bit of data instead of 8 bit, but in SDK there is only described an 8, 16, 32 bit mode. D7 to D0 is the actual data which is transfered. The special bit should just indicate the slave if the data is a command byte or a data byte. The slave devices offers a normal "4-wire mode (SPI + Data/Command-GPIO) or a "3-wire mode" which saves the additional Data/Command-GPIO and includes the information of this GPIO in the additional bit which needs to be transmitted in the SPI stream when "3-wire" is selected.

If it is not clear I can share confidential information via E-Mail.

PM_Dialog
Offline
Last seen:14 hours 35 min ago
Staff
加入:2018-02-08 11:03
嗨Firefox2005,

嗨Firefox2005,

Thanks for your detailed response. However, only 8, 16 or 32 bit mode is supported by the SDK.

Thanks, PM_Dialog

Firefox2005
Offline
Last seen:20 hours 31 min ago
加入:2016-04-13 09:36
There needs to be a solution.

There needs to be a solution. I think this is popular requirement for example when it comes to drive LCD displays. Would it be possible to bitbang the first additional bit into the data transfer?

PM_Dialog
Offline
Last seen:14 hours 35 min ago
Staff
加入:2018-02-08 11:03
嗨Firefox2005,

嗨Firefox2005,

As mentioned in my previous comment only 8, 16 or 32 bit mode is supported by the SDK. Bitbanging the first additional bit into the data transfer, it might be possible but there isn’t any example or guideline for how to do it. It is also not supported in the SPI driver, so you should do your own implementation on this.

Thanks, PM_Dialog