cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4xx alternate configuration SPI1 issues

gvigelet2
Associate II
Posted on May 19, 2014 at 14:04

Hello Everyone,

I was just wondering if anyone has seen this, I have seen this only referenced on one website.  I have SPI1 on a STM32F415 configured as 

  PA7   ------> SPI1_MOSI

  PB3   ------> SPI1_SCK

  PB4   ------> SPI1_MISO 

Which works fine until i configure PE3, as soon as I do that the SPI1 stops working if I comment the following out it will work again.

  /*Configure GPIO pins : PE3  */

//  GPIO_InitStruct.Pin = GPIO_PIN_3;

//  GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;

//  GPIO_InitStruct.Pull = GPIO_NOPULL;

//  GPIO_InitStruct.Speed = GPIO_SPEED_FAST;

//  HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);

I haven't seen no errata about it, am I the only one seeing this?

Thanks,

George
14 REPLIES 14
Posted on May 19, 2014 at 18:37

> I have an Accelerometer CS line hooked to PE3, the issue is if I am not using the pin for anything

I don't understand, so do you have the accelerometer's CS line hooked to PE3, or not?

If so, simply set PE3 to 1 when you set it to output.

JW

gvigelet2
Associate II
Posted on May 19, 2014 at 19:11

Yes the CS line for the accelerometer is connected to PE3.  When i configure the PE3 ping as GPIO output with nopull it causes me an issue on spi1 if i never configure the pin or just disable the port e clock the spi1 works fine.

Posted on May 19, 2014 at 20:14

OK and what happens if you set PE3 to output 1 ?

JW
Posted on May 20, 2014 at 15:33

I do not know if your problem is similar to mine or not but I think there are similarities

No, I think that's just some self-interest clouding your perspective.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..