STM32F4: no clock on SPI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2012-06-12 4:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2012-06-12 5:01 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2012-06-12 5: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(); }- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2012-06-12 6: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.Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2012-06-12 6:52 AM
Correct! Also see the SPI Flash example in the STM32F4 Library Examples to see how they do it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2012-06-12 8: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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2013-03-15 2:06 PM
SCLK must be B10 and not B13
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2013-03-15 2:27 PM
SCLK must be B10 and not B13
Under what circumstances? Care to elaborate?Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-04-25 3: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 :\ ??- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-04-25 5: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?