SPI transfer fail

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

SPI transfer fail

998件の閲覧回数
lyk
Contributor I

hello

     I have a question about spi .

     when I  transfer data by spi, the flag of TCF does not set, the code like below:

     

data &= 0xff;
cont &= 0x01;
cs &= spi_cs_mask[com];
pushr_tmp = (data<<DATA_SHIFT)|(cs<<PCS_SHIFT)|(ctar_current<<CTAS_SHIFT)|(cont<<CONT_SHIFT);

pspi[com]->PUSHR.PUSHR.R = pushr_tmp;

while(1 != pspi[com]->SR.B.TCF){
        secure_counter++;
        if (secure_counter > SPI_SECURE_COUNTER) {
            return 0xff;
        }
 }

It will always return 0xff.

0 件の賞賛
返信
0 返答(返信)