Sounds a bit strange to use a function to write data to the external SDRAM.
After initialization one would use a pointer to access the RAM since it's in the memory address range, or use some compiler specific attributes to place data there and leave the linker do the rest. Don't know anything about how to do that with the Keil tools, but in general, you'd have to define this in the linker files.