cancel
Showing results for 
Search instead for 
Did you mean: 

SPI 9bit Frame

elmasry_netup
Associate
Posted on January 23, 2013 at 20:08

Dear Friends; 

I use SPI protocol @ stm32f100c4 to interface with GLCD , to interface GLCD frame must be  SPI 9bit.

From Datasheet: Stm32f100C4 has two mode 8bit frame or 16 bit frame for sending data by SPI protcol but i need to configure SPI frame 9 bit.  

How could i use SPI @ stm32f100C4 to send by SPI with frame 9 bit ?   
3 REPLIES 3
Posted on January 23, 2013 at 21:49

It doesn't have a 9-bit mode, you'll have to think outside the box.

Perhaps you can align the data, or send multiple bytes (72-bits?)

https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/9bit%20SPI&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&currentviews=1071

The F0 has 4-16 bit modes.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
elmasry_netup
Associate
Posted on January 24, 2013 at 11:14

@ Clive1 >>> many thanks for your efforts and i will try your notes

hanzouti_iia
Associate
Posted on February 02, 2013 at 08:31

Hi,

only with STM32F0x family the SPI data size is configurable from 4bit to 16bit, otherwise you you can emulate the SPI 9bit by your software, try to use two gpio pin one for clock and the other for data, and you can develop by software an SPI, as it is done by mickroC Pro for ARM.