===================================================================
MCF5213EVB
===================================================================

Contents:

I)     Quickstart
II)    Terminal Settings
III)   Connecting to the Board
IV)    Programming Onto Board
V)     Memory Maps
VI)    Description by Project


Projects in this release (\build\cw\m5213evb\):
  adc - Analog to Digital Convertor
  cfm - Coldfire Flash Module
  example - Simple LED blink example
  flexcan - FlexCAN
  gpio - General Purpose Input/Output interface
  gpt - General Purpose Timer
  pit - Programmable Interrupt Timer
  pll - Phase Locked Loop module to set clock speed
  power - Idle/Sleep interface
  qspi - Queued Serial Peripheral Interface
  timer_interrupt - DMA Timer

===================================================================
I)  Quickstart
===================================================================
1. Connect a RS232 cable from UART0 to a computer. 
2. Set terminal program to 19200 baud, 8 data bits, no parity, 1 stop bit, no flow control
3. Load desired .mcp file in CodeWarrior 6.4. New users should start with mcf5213evb_example.mcp
4. Compile for either SRAM or Flash target
5. Load onto board. See Section IV.
6. Follow prompts on the terminal screen


===================================================================
II)  Terminal Settings
===================================================================

The UART defaults to the following settings

Baud Rate : 19200
Data bits : 8
Parity : None
Stop Bits : 1
Flow Control : None

===================================================================
III)  Connection to the M5213EVB Board
===================================================================

1) All jumper settings and switches are in their default locations
as outlined by the EVB user's manual.

2) The P&E cable is attached to the BDM connector.

3) An appropriate power supply is connected to the power jack as 
outlined in the EVB user's manual.

4) Check all the target Remote Connection panels to make sure the P&E
cable is selected.

===================================================================
IV)  Programming Onto Board
===================================================================

For SRAM:
1) Press the green "play" button in the project tab.
2) Press play again to start running
3) If problems occur, make sure "Debugger" settings are correct 

For Flash:
1) Select "Flash Programmer" from the Tools menu.
2) Select "Flash Configuration" from the menu on the left side of the dialog box
3) Click the "Load Settings" button and select the XML for for the chip being used, 
   then click on "Open".
   It will be located in <CodeWarrior_Install_Dir>\bin\Plugins\Support\Flash_Programmer\ColdFire
4) Make sure everything in the "Target Configuration" and "Flash Configuration" are correct
5) Go to "Erase / Blank Check" and click on "Erase". Wait for it to erase.
6) Go to "Program / Verify" and click on "Program". Wait for it to program.
7) Now press reset on the M5213EVB to begin running the program

===================================================================
V)  Memory maps
===================================================================

The MCF5213 has the following memory map:

0x00000000-0x0003ffff 256K bytes of on-chip Flash memory
0x20000000-0x20007fff  32K bytes of internal SRAM

===================================================================
VI) Description by Project:
===================================================================

adc:
   Consists of a command line interface to run conversions 
   Commands:
	help - Help
	show - Show key ADC values
	offset - Set the voltage offset for conversions on selected channel
	dump - Display all ADC registers
	disable - Disables selected ADC channels from conversions
	average - find the average of x conversions (defined by data) 
		  on one A/D channel (AN0 by default)
	start - Start conversions
	stop - Stops all ADC conversions
	sleep - Puts the processor in to the lowest power stop mode,	
	 	waking the processor up once a second, doing one A/D conversion
	zero - Set the zero crossing condition for conversions 
	       crossing the 0V boundary
	adlst1 - Order the list of the analog input channels to be
		 converted when the next scan is initiated
	adlst2 - Order the list of the analog input channels to be
		 converted when the next scan is initiated
	adllmt - Low Limit Register
	adhlmt - Set the high limit comparison for conversions
  	set - Set the following options
		chncfg - changes the Channel Configuration 
			 in the ADC control 1 register.
		smode - sets the Scan Mode in the ADC control 
			1 register

cfm:
   Writes and Erases the flash. All addresses must be word aligned.
   If the program is loaded onto flash, it finds the pages that are 
   not occupied by the execution code to write, erase, and verify. If 
   the program is loaded into SRAM, it will write, erase, and verify
   the entire flash.

example: 
   Simply toggles the LEDs. 

flexcan:
   Follow the prompts on the terminal to run the following examples:
   	Setting Baudrate
   	Loopback
   	TX with Polling Example in MB0
   	TX with Polling Example in all MBs
   	TX with Interrupts Example in all MBs
   	RX with Polling Example in MB0
   	RX with Polling Example in all MBs 
   	RX with Interrupts Example in MB0 
   	RX with Interrupts Example in all MBs 
   	Filtered RX with Interrupts Example in all MBs 
   	Error with polling Example

gpio:
  Consists of a command line interface to write and read from the GPIO registers
    The address should be in hex and is added to IPSBAR[0x10_0000] to calculate 
    the register address. The value should be in hex.
  To change the LED lights, use:
      setreg8 27 0f
      setreg8 0f 0a
  Commands:
  	dump - view GPIO registers
        setreg - write a value to register (32 bit by default)
        setreg8 - write a 8 bit value to register
        setreg16 - write a 16 bit value to register
        setreg32 - write a 32 bit value to register
   	setpin - set a pin (0-7) on a particular register to 0 or 1
        getport - reads GPIO port register
        getportp - reads GPIO PORTP/SET register

gpt:
   Follow the prompts on the terminal to run the following examples:
	GPIO
	Pulse Accumulator
        Input Capture
	Output Compare
	PWM

pit:
   Follow the prompts on the terminal to run the following examples:
	Periodicity - Toggle an LED at a particular frequency
	Countdown - Bring LED1 high for a specified period of time

pll:
   Consists of a command line interface to change PLL values
   Commands:
	help - Help
        show - Show key PLL values
	clk - Set the PLL output clock
	dump - Show all the PLL registers
	set - Set the following options
		sysclk
       		syncr
         	mfd
         	rfd
         	lpd
         	otr
        	baud
      
power:
   Consists of a command line interface to change the power settings
   Press the ABORT button on the board to exit loop or low-power mode
   Commands:
	help - Help
	show - Show key power values
	clk - set PLL output block
	stop - Put in lowest power mode
	wait - Put in wait low-power mode
	doze - Put in doze low-power mode
	idle - Put in idle low-power mode
	run - Put in run low-power mode
	loop - run a loop
		one - while(1) loop
		nop - nop loop
		tpf - tpf loop
		poll - poll uart
	rd - Register display
	ppm - Peripheral Power Management
	crunch - Number Crunching Application
	wakeup - Sleep/Wakeup Application. Goes to sleep 
		 and wakes up every second to execute 
		 multiplication and division instructions
	set - set the following options
		sysclk
      		clkout [on,off]
        	lpd
       		stpmd [0,3]
       		lvdse [0,1]
       		xipl [0,7]
        	baud 
        	step
     		pwrcfg [min,max,typ]

qspi:
   Follow the prompts on the terminal to run the following examples:
	Transmission
	SPI Finished Interrupt
	SPI Abort 
	Transfer Wraparound 
	Baudrate
	Number of Bits

timer_interrupt:
   Increments the LED's every 0.5 seconds using a timer interrupt
