cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F429 Dead alternate function on pin?

ricardomadera
Associate II
Posted on November 16, 2016 at 06:42

Hello,

I am trying to configure pins D0-D15 on the STM32F429VIT6 to output sram data. The code seems to be functioning properly and I have scoped out each of the pins however Pin44(PE13)-D10 seems to never go high. Configuring the pin to gpio allows it to toggle on and off. Is it possible to damage  an alternate function on a pin? 

Below is the GPIO init code.

void SRAM_GPIOConfig()

{

RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOD | RCC_AHB1Periph_GPIOE, ENABLE);

 GPIO_InitTypeDef GPIO_InitStructure;

 /* Common GPIO configuration */

 GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF;

 GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;

 GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;

 GPIO_InitStructure.GPIO_PuPd  = GPIO_PuPd_NOPULL;

 /* GPIOD configuration */

 GPIO_PinAFConfig(GPIOD, GPIO_PinSource0, GPIO_AF_FMC);

 GPIO_PinAFConfig(GPIOD, GPIO_PinSource1, GPIO_AF_FMC);

 GPIO_PinAFConfig(GPIOD, GPIO_PinSource8, GPIO_AF_FMC);

 GPIO_PinAFConfig(GPIOD, GPIO_PinSource9, GPIO_AF_FMC);

 GPIO_PinAFConfig(GPIOD, GPIO_PinSource10, GPIO_AF_FMC);

 GPIO_PinAFConfig(GPIOD, GPIO_PinSource11, GPIO_AF_FMC);

 GPIO_PinAFConfig(GPIOD, GPIO_PinSource14, GPIO_AF_FMC);

 GPIO_PinAFConfig(GPIOD, GPIO_PinSource15, GPIO_AF_FMC);

 GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0  | GPIO_Pin_1   |  GPIO_Pin_8  | GPIO_Pin_9  | GPIO_Pin_10 |

                                GPIO_Pin_11 | GPIO_Pin_14 |           GPIO_Pin_15;

  GPIO_Init(GPIOD, &GPIO_InitStructure);

  /* GPIOE configuration */

  GPIO_PinAFConfig(GPIOE, GPIO_PinSource0 , GPIO_AF_FMC);

  GPIO_PinAFConfig(GPIOE, GPIO_PinSource1 , GPIO_AF_FMC);

  GPIO_PinAFConfig(GPIOE, GPIO_PinSource3 , GPIO_AF_FMC);

  GPIO_PinAFConfig(GPIOE, GPIO_PinSource4 , GPIO_AF_FMC);

  GPIO_PinAFConfig(GPIOE, GPIO_PinSource7 , GPIO_AF_FMC);

  GPIO_PinAFConfig(GPIOE, GPIO_PinSource8 , GPIO_AF_FMC);

  GPIO_PinAFConfig(GPIOE, GPIO_PinSource9 , GPIO_AF_FMC);

  GPIO_PinAFConfig(GPIOE, GPIO_PinSource10 , GPIO_AF_FMC);

  GPIO_PinAFConfig(GPIOE, GPIO_PinSource11 , GPIO_AF_FMC);

  GPIO_PinAFConfig(GPIOE, GPIO_PinSource12 , GPIO_AF_FMC);

  GPIO_PinAFConfig(GPIOE, GPIO_PinSource13 , GPIO_AF_FMC);

  GPIO_PinAFConfig(GPIOE, GPIO_PinSource14 , GPIO_AF_FMC);

  GPIO_PinAFConfig(GPIOE, GPIO_PinSource15 , GPIO_AF_FMC);

  GPIO_InitStructure.GPIO_Pin =

                                GPIO_Pin_7  | GPIO_Pin_8  | GPIO_Pin_9  | GPIO_Pin_10 |

                                GPIO_Pin_12 | GPIO_Pin_13 | GPIO_Pin_14 |

                                GPIO_Pin_15;

  GPIO_Init(GPIOE, &GPIO_InitStructure);

}

11 REPLIES 11
ricardomadera
Associate II
Posted on November 16, 2016 at 23:32

Ok, with the load disconnected, checked the GPIOD & E registers and they are setup correctly. I also ported the same code to the F4Disco board and it worked on all pins. I am a bit clueless as to whats going on now if a hardware issue is very unlikely. I am using the Periph v1.2 library on both targets. 

Posted on November 17, 2016 at 00:33

The 'F429 DISCO, or the 'F407 DISCO?

Is there anything else connected to the FMC,e.g. a SDRAM?

Did you go through the FMC errata? There are quite a few of them, although most of them for specific scenarios.

The LCD peripheral is on or off? I'd assume off, given the small package, but I though to ask just to be sure (it should not collide but one never knows). (Btw, why not the '427?)

Any other peripheral enabled, even a seemingly unrelated one (such as USB,  or ADC/DAC)?

Did you try the GPIO-wiggling while everything else is initialized as in the case in question (except this particular pin), or was it a minimal test program?

JW