cancel
Showing results for 
Search instead for 
Did you mean: 

32F429IDISCOVERY SDRAM(FMC) and PG2 pin problem

mchalapetr
Associate II
Posted on May 14, 2015 at 18:09

Hi,

I have a very strange problem with the SDRAM controlling and PG2 pin use. I use SDRAM as an additive memory space so it is vital for my program because I do calculations that need a lot of space. This works very well. I just move memory allocations by _sbrk() to SDRAM. But recently I added a NPN tranzistor with external pullup to PG2 pin and this causes the SDRAM(FMC) to crash and MCU goes to default handler (infinite loop)...

I dont get how pin that is NOT part of the SDRAM at all can do something like that. If the PG2 pin is configured as OUT and is set like GPIO_SetBits then it fails. If I for example just initialize the pin and leave it as GPIO_ResetBits then its fine...

Thanks very much for any ideas...

BTW the pin PG2 affects data too...For example if I leave it in reset state then the LED is ON ad if I connect the pin manualy to VCC then the LED is trned off and the data is affected...Personally it seems to me that he SDRAM(FMC) uses this pin but its impossible...

#stm32f4 #gpio #sdram #fmc
2 REPLIES 2
nesrine
Senior
Posted on May 15, 2015 at 12:37

Hello,

Checking STM32F429 datasheet

,

Pinouts and pin description section, I found that the PG2 pin has as alternate function FMC_A12.

I hope this helps.

mchalapetr
Associate II
Posted on May 15, 2015 at 13:12

I know...This is general for STM32F429 MCU but the 32F29IDISCOVERY board uses SDRAM only to FMC_A11.

So in the board datasheet you can see that PG2 is considered a free pin...Thats why I  think that it is a some library problem...I use PG2 only as a general GPIO (FMC doent use it) and it affects the SDRAM...