I got a source file DeepSleep.c from Michael Stevens with TI Applications Support that I'm told will run bare metal (meaning not on Linux) and will put the DM365 into deep sleep. I have compiled said file into a binary and tried loading it into SRAM (address 0x10000) and running it from U-Boot. When I use my Olimex JTAG debugger, it seems to be stuck in a loop waiting for DDR Status register (0x20000004) to show that the DDR clock has been disabled. It seems to me that I need to change the stack pointer to a region in SRAM to avoid calls to DDR. Anyone have experience with this?