SPI communication establish

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

SPI communication establish

907 次查看
VamsiChava
Contributor I

Hi,

I am trying to establish SPI communication between SBC uja 1169a and MC9S12XSP100. I have done as below 

  /*Initialize SPI*/
    SPI1CR1 =  (vuint8)0x52;   /*SPIE SPE SPTIE MSTR CPOL CPHA SSOE LSBFE */
                               /* 0    1   0     1    0     0    1    0    */
   
    SPI1CR2 =  (vuint8)0x52;     /*  R   XFRW R MODFEN BIDIROE R SPISWAI SPC0 */
                                 /*  0   1    0     1      0     0    1    0 */

    SPI1BR =   (vuint8)0x11;     /*  R  SPPR2 SPPR1 SPPR0 R SPR2 SPR1 SPR0 */  //3.125Mh -8 division
                                 /*  0   0      0     1   0    0    0    1 */
 
But I am grtting 00 from SPIDR while reading from register. Please help me to resolve the issue
0 项奖励
回复
0 回复数