Skip to main content
zeros_and_ones1991
Associate III
February 2, 2015
Question

SPI3 is not enabled ?!

  • February 2, 2015
  • 0 replies
  • 491 views
Posted on February 02, 2015 at 14:15

Hullo guys , I'm using STM32F429I , when i configure the SPI3 according this intialization 

RCC_APB1PeriphClockCmd(RCC_APB1Periph_SPI2 , ENABLE);

SPI_I2S_DeInit(SPI2);  

SPI2_Struct.SPI_BaudRatePrescaler=Baud_Rate_Prescaler; 

SPI2_Struct.SPI_CPHA=SPI_CPHA_1Edge ; 

SPI2_Struct.SPI_CPOL=SPI_CPOL_Low ; 

SPI2_Struct.SPI_CRCPolynomial=3; 

SPI2_Struct.SPI_Direction=SPI_Direction_2Lines_FullDuplex;

SPI2_Struct.SPI_FirstBit=SPI_FirstBit_MSB ;

SPI2_Struct.SPI_Mode=MASTER_SLAVE; 

SPI2_Struct.SPI_NSS=SPI_NSS_Soft; 

SPI2_Struct.SPI_DataSize=SPI_DataSize_8b; 

SPI_Init(SPI2,&SPI2_Struct);

it is configured correctly , but when I enable the SPI by SPI_Cmd(SPI2,ENABLE);

the SPE bit is not set and the MSTR bit is cleared (!!!!!!!!!!) 

When I call SPI_Cmd(SPI2,ENABLE); , before the initialization , the SPE bit is enabled 

Any help ? 
    This topic has been closed for replies.