Tried with bare code, the DDR stack behavior is fine when we use recursive function call passing multiple arguments, but, when I use Multiple register data transfer instructions shown in below example, processor is getting hang.
Example:
stmed sp!, {r0,r1,r2,r3}
ldmed sp!, {r0,r1,r3,r4}
Also tried with reducing the DDR frequency (360MHz, 340MHZ) configuration and changing the mode registers and enabling auto refresh mode, still we don't see any difference in DDR stack pointer.
But I am able to write the pattern into my DDR device.
processor : arm1176
DDR conrtoller : Denali datbhan
DDR device : MT47H128M16RT-25E
About AXI, you're better asking somebody other than me. Perhaps raise another question that specifically mentions AXI in the title or/and set tags mentioning amba and axi. Or contact whatever support you have about it.
STMED = STMDA r5!,{r0-r3} stores four words at r5-12 and r5 is set to r5-16
STMFA = STMIB r5!,{r0-r3} stores four words at r5+4 and r5 is set to r5+16
STMFD = STMDB r5!,{r0-r3} stores four words at r5-16 and r5 is set to r5-16
STMEA = STMIA r5!,{r0-r3} stores four words at r5 and r5 is set to r5+16
Halting is the sort of thing some interface protocol going wrong is liable to do with both sides waiting for the other. Plus the problem was happening with a number of transfers starting on a word but not double word boundary which didn't sound like anything at either end but something in the middle. Also there seem to be a number of questions about burst transfers on this board and alignment and the protocol isn't altogether straightforward. Getting memory transfers working fast is very important and speed is often the enemy of simplicity. So I think it is worth asking further to make sure your settings are good as you don't want to halve your memory access speed by mistake.
I suggested the change by 4 would make one set of STM's work and the other fail as then the ones that failed would start on an 8 byte boundary and the others would not