SPI via eTPU with CPOL=0 and CPHA=1 possible?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

SPI via eTPU with CPOL=0 and CPHA=1 possible?

1,664件の閲覧回数
Bernhard1
Contributor I

I want to use the SPI function of the eTPU (MCF5234) with CPOL=0 and CPHA=1. With fs_etpu_spi_init() I can set polarity to FS_ETPU_SPI_CLK_POL_NEG or FS_ETPU_SPI_CLK_POL_POS, but I do not get the achieved mode. Can anyone help me on that problem? Is this mode theoretically possible?

 

Thank you very much.

Bernhard

ラベル(1)
3 返答(返信)

565件の閲覧回数
stzari
Contributor III

Hi,

 

this should be the basic mode with positive clock polarity as shown in the description of the SPI eTPU function.

Did you check the application note AN2847 ?

 

HTH

 Stamatis

565件の閲覧回数
Bernhard1
Contributor I

Thank you for your reply.

 

I checked the AN 2847 and found the diagrams for CPOL=0 / CPHA=0 and CPOL=1 / CPHA=0 (see http://upload.wikimedia.org/wikipedia/commons/7/73/Spi003.png). But i do not know how to achieve CPHA=1 modes. Since i have no eTPU compiler, I cannot modifiy the standard Freescale SPI eTPU functions to my needs. Is there a free compiler for the standard eTPU functions available?

 

The problem is, that my slave devices pushes the data with the risigng edge on the line. With AN2847 figure 2, the slave has to set the line before any clock edges (normally after CS going low), so it can be sampled from the master with the first (falling) edge (and that doesn't fit my slave device). 

  

Bernhard

0 件の賞賛

565件の閲覧回数
stzari
Contributor III

I don't see an easy method to achieve this.

AFAIK there is no free eTPU compiler (Bytecraft and Ashware being the ones I know of).

As a possible hack (don't know whether this would work with your hardware) you could try increasing the transfer size and masking out unused bits.

You could also try to raise a service request with Freescale

 

Stamatis

0 件の賞賛