Skip to main content
arunnmishra
Associate II
August 6, 2014
Question

large SDRAM access causing hardfault in stm32f429

  • August 6, 2014
  • 3 replies
  • 1524 views
Posted on August 06, 2014 at 11:49

Hello there!

I've interfaced 128 MB(16 bit data bus) sdram through fmc interface in my stm32f429 device. Initialization and everything seems ok. Reading/writing to sdram is ok for small chunks. But writing 12 MB or larger (from base address 0xd0000000) is causing hard fault. Similarly for higher memory ranges(Say 0xd1000000) even lesser amount can be accessed continuously without causing hard fault. I've written and read back whole chip correctly by accessing memory in smaller chunks(i.e tested first few MB than further and so on).

If there any one who have faced the similar problem of any suggestion/solution regarding this behavior.

Thanks in advance   

#stm32f429 #!psychic #external-ram
This topic has been closed for replies.

3 replies

Tesla DeLorean
Guru
August 6, 2014
Posted on August 06, 2014 at 14:57

Hard to say, you'd perhaps want to look at the registers in the faulting case to try and understand what was going on. The primary reason it would hard fault is that the access exceeds the memory array in some fashion.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
arunnmishra
Associate II
August 8, 2014
Posted on August 08, 2014 at 12:03

Thanks clive1, I also suspected on faulty registers initially but when I access those register individually, they worked fine. Though I've successfully initialized my memory and moved my heap to those external ram and everything working fine till time, but still I think that the design might produce some problem in the field    

Tesla DeLorean
Guru
August 8, 2014
Posted on August 08, 2014 at 17:52

These types of gross faults should be easier to pin down than most. Would recommend implementing an effective Hard Fault handler that can dump register and stacked states. Joseph Yiu has some that are a reasonable starting point, and orders of magnitude better than a while(1); loop

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..