AnsweredAssumed Answered

STM32 SPI Issue

Question asked by k.harikrishnan on Aug 3, 2011
Latest reply on Sep 27, 2013 by black.tony
Hai,
I am using STM32F103ZE
I am not getting SPI data correctly.
Master is transmitting correctly.
But always read as zero where a non zero value has been sent.

Master config: (MSP430)
The master configuration is correct. (I tested it.)
Master Mode, MSB First, 8-bit SPI, Inactive state is high., ss grounded, 1 MHz clock, no dividers
Slave Config (STM32F103ZE)
Using SPI2.
  SPI_InitStructure.SPI_Direction = SPI_Direction_1Line_Rx;
  SPI_InitStructure.SPI_Mode = SPI_Mode_Slave;
  SPI_InitStructure.SPI_DataSize = SPI_DataSize_8b;
  SPI_InitStructure.SPI_CPOL = SPI_CPOL_High;
  SPI_InitStructure.SPI_CPHA = SPI_CPHA_1Edge;
  SPI_InitStructure.SPI_NSS = SPI_NSS_Soft;
  SPI_InitStructure.SPI_BaudRatePrescaler = SPI_BaudRatePrescaler_2;
  SPI_InitStructure.SPI_FirstBit = SPI_FirstBit_MSB;
  SPI_InitStructure.SPI_CRCPolynomial = 7;


Anybody have an answer,
Thanks
Hari

Outcomes