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 14:24

Post a minimal, but complete compilable example which exhibits the problem.

You might also want to post the link to the mentioned website.

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

Hi the following is a link to the minimal project, to exhibit the behavior un-comment the PE3 Configuration code in main::MX_GPIO_Init()

 

https://drive.google.com/file/d/0B9AbQf-Nlf0KQ0ZJOWFaVjlfUlE/edit?usp=sharing

Thank You,

George

Posted on May 19, 2014 at 15:50

Code looks reasonable.

What exactly are the symptoms of ''not working''? Did you check the signals with an oscilloscope?

Can't there be a hardware issue, e.g. PE3 shorted onto some of the SPI lines?

JW
Posted on May 19, 2014 at 16:02

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

Assume you are, and provide details about the board or anything else unique to your situation that you would need to communicate to a third-party for them to be able to independently analyzer and verify the issue.

Most Cube/HAL related support is occurring on the other STM32 Forum page.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on May 19, 2014 at 16:27

What is connected to PE3?

Don't you use a DISCOVERY board, by chance? There is an error in the table indicating the pins' connections, related to PE3.

JW
Posted on May 19, 2014 at 16:47

Related thread, but abandoned without resolution

Jan thanks for the link. Indicates we're not alone, but still really not enough meat to suggest it's a chip errata and not a circuit board level issue.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
gvigelet2
Associate II
Posted on May 19, 2014 at 17:59

Thanks for all the responses, I will check with my STM324xG-EVAL board when I get home, the board that I am using is a custom board and I was able to reproduce it on the stm32f4discovery board (I will try that board again also when I get home).  I will look for a possible short.

Thanks,

George

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

I have an Accelerometer CS line hooked to PE3, the issue is if I am not using the pin for anything and when I initialize the pin in the test program i set it as output with nopull (which should leave it floating).  I did verify that there is no shorts, I will need to hook up the scope again and see what it looks like in both states.