I can't find anything that coherently explains how to make the SDRAM useable. There is example code (semc_sdram) but it uses absolute memory addresses and thus is useless for typical programs where we need variables and arrays in SDRAM. And in that example the SDRAM is not accessible until BOARD_InitSEMC() is called, in main(), so static variables in SDRAM cannot be initialized to zero at startup, as C requires.
There seem to be a lot of moving parts involved:
- the pin config - is there a list of the pins we need to config and how to set them, in the Pin view?
- the Peripherals view - what settings does the SDRAM require in the big list on the SEMC page, and should the Mode be "general" or "DCD"?
- how does DCD work with regard to the SDRAM?
- even if we have the DCD setting the SDRAM correctly on boot, is it true that downloading an app with DAPlink will not configure the SDRAM correctly? If not, do we need a LinkServer script? If so, what script, and is it a Reset script or a Connect script?
- in one other response re SDRAM on RT1050 it was mentioned to define XIP_BOOT_HEADER_DCD_ENABLE=1 (and some linker script settings) but is XIP even relevant if I'm executing from RAM, not flash?