cancel
Showing results for 
Search instead for 
Did you mean: 

spi - shift by one bit problem

omatza
Associate II
Posted on November 16, 2005 at 07:28

spi - shift by one bit problem

2 REPLIES 2
omatza
Associate II
Posted on November 16, 2005 at 07:10

Hello

I have SPI master board, connected to the PC and send bytes to my application which run on ST7.

I sent one byte at the time from the PC, and poll to get it on the ST7.

I see that I have ''shift in the data''.

for example, When PC send 0x32 = 0b00110010, ST7 gets 0x64 = 0b01100100,

or when PC send 0x33 = 0b00110011, ST7 gets 0x66 = 0b 01100110.

(I use CPOL=0 CPHA=1 and the speed is very low 5Khz to 62Khz)

The ST7 configurate as slave in software SSM=1 SSI=0, and the /SS pin is used as floating input GPIO (but currently not used)

Any hint ?

Yours

Oren

omatza
Associate II
Posted on November 16, 2005 at 07:28

Hello

forgot to mention, it can be shit by one in other direction, e.g.

0x32 = 0b00110010 becomes 0x19 = 0b00011001

:-[

Oren