AnsweredAssumed Answered

standard peripheral libraries help

Question asked by mahmoud boroumand on Feb 18, 2018
Latest reply on Feb 18, 2018 by Clive One

hello 

can anybody help me about these code

 

 

/////////////////////////////////////////////////////////////////////////////////////////////

/* Enable SPI in Master Mode, CPOL=0, CPHA=0. */
/* Clock speed = fPCLK1 / 256 = 280 kHz at 72 MHz PCLK1 clk. */
SPIx->CR1 = 0x037C;
SPIx->CR2 = 0x0000;

/////////////////////////////////////////////////////////////////////////////////////////

this is my code below

 

* SPI configuration */
SPI_InitStructure.SPI_Direction = SPI_Direction_2Lines_FullDuplex;
SPI_InitStructure.SPI_Mode = SPI_Mode_Master;
SPI_InitStructure.SPI_DataSize = SPI_DataSize_8b;
SPI_InitStructure.SPI_CPOL = SPI_CPOL_Low;
SPI_InitStructure.SPI_CPHA = SPI_CPHA_1Edge;
SPI_InitStructure.SPI_NSS = SPI_NSS_Soft;
SPI_InitStructure.SPI_BaudRatePrescaler = SPI_BaudRatePrescaler_256;
SPI_InitStructure.SPI_FirstBit = SPI_FirstBit_MSB;
SPI_InitStructure.SPI_CRCPolynomial = 7;
SPI_Init(EVAL_SPIx, &SPI_InitStructure);

 

are they equal?if it not equal can tell me what  should  i change?

Outcomes