2012-06-12 04:41 AM
2012-06-12 05:01 AM
2012-06-12 05:06 AM
Yes, I do. I forgot to copy this part of the code:
void Init_Init(void) { init_RCC_Config(); init_GPIO_Config(); init_TIM_Config(); init_SYSTICK_Config(); init_DCMI_Config(); init_SPI_Config(); }2012-06-12 06:40 AM
I'm pretty sure you're going to need to send some sacrificial data to generate receive clocks, and make sure you clear RXNE before doing so.
SPI_I2S_ReceiveData() just reads a holding register, it does not generate clocks.2012-06-12 06:52 AM
Correct! Also see the SPI Flash example in the STM32F4 Library Examples to see how they do it.
2012-06-12 08:39 AM
I'm pretty sure you're going to need to send some sacrificial data to generate receive clocks,
I'm absolutely positive you're going to need to send some data to generate receive clocks. SPI does not have receive clocks only ''clocks generated by transmit''. for some protocols, the transmit data is not ''sacrificial'' Erik
2013-03-15 02:06 PM
SCLK must be B10 and not B13
2013-03-15 02:27 PM
SCLK must be B10 and not B13
Under what circumstances? Care to elaborate?2014-04-25 03:26 AM
Hi everyone ,
i'm working on a wave player project using the SPI communication options.So , I configure the SPI as given below:RCC_APB1PeriphClockCmd(RCC_APB1Periph_SPI2, ENABLE); /* SPI1 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; // 72000kHz/256=281kHz < 400kHz SPI_InitStructure.SPI_FirstBit = SPI_FirstBit_MSB; SPI_InitStructure.SPI_CRCPolynomial = 7; SPI_Init(SPI2, &SPI_InitStructure); SPI_NSSInternalSoftwareConfig(SPI2, SPI_NSSInternalSoft_Set); SPI_CalculateCRC(SPI2, DISABLE); SPI_Cmd(SPI2, ENABLE);The pins connections are used in AF mode with gpioB But , when i wanna see the sck clock edge , i just have a constant signal value of 3v (position high) I am sure that i have missed something with the the configuration but i didn't know what exactly Can someone help me please :\ ??2014-04-25 05:21 AM
1. Generally data transmittion via spi starts when master device drives CS(NSS) pin low.
2. The transmit sequence begins when a byte is written in the Tx Buffer. Did you put any data in to SPI_DR register?