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