To set the CSMR for a 1MB area and enable the chip select, you want something like/p>
MCF5282_CS1_CSMR = MCF5282_CS_CSMR_BAM_1M | MCF5282_CS_CSMR_V;
If you're using CodeWarrior, the header files contain the definitions you need for these equates. Otherwise you also need:
#define MCF5282_CS_CSMR_BAM_1M (0x000F0000)#define MCF5282_CS_CSMR_V (0x00000001)
You'll also need to make sure that you configure the CSCR appropriately.
You might find it helpful to look at a free program called ColdFire Init, which lets you configure the ColdFire processor (including the Chip Selects) through a GUI front-end, and then generates initialisation code for you. It's available from MicroAPL's web site:
http://www.microapl.co.uk/CFInit/cfinit_main.htmlMCF5282_CS1_CSAR = MCF5282_CS_CSAR_BA((uint32)__BASE_ADDR_FPGA); MCF5282_CS1_CSCR = (0 | MCF5282_CS_CSCR_WS(2) | MCF5282_CS_CSCR_AA | MCF5282_CS_CSCR_BSTR | MCF5282_CS_CSCR_PS_16); MCF5282_CS1_CSMR = MCF5282_CS_CSMR_BAM_1M | MCF5282_CS_CSMR_V;
So __BASE_ADDR_FPGA is your base address. All the other constants come from Freescale's headers and set CS1 for 2 wait states, auto acknowledge, burst read enable, 16 bit port size.
CSMR is set to 1MB and Valid. If you don't have the header
MCF5282_CS_CSMR_BAM_1M is 0x000F0000 and
MCF5282_CS_CSMR_V is 0x00000001
Paul.