2014-08-06 02:49 AM
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-ram2014-08-06 05:57 AM
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.
2014-08-08 03:03 AM
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
2014-08-08 08:52 AM
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