problem about SDRAM power-up initialization

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

problem about SDRAM power-up initialization

1,805 Views
sunwind45
Contributor I
How does CodeWarrior realize the initialization using its user Initialization file? 
Labels (1)
0 Kudos
1 Reply

452 Views
Black
Contributor I
I assume that you are using the CodeWarrior for Power Architecture but things are working about the same also for ColdFire.
 
As a first step you must to be able to debug a project in RAM using a board-specific init.cfg file. Furthermore, "Verify Memory Writes" must be checked in the project's EPPC Debugger Settings panel. Once the debugger can step and run through the main code on the board with Verify Memory Writes on, you can build the ROM version of the project and program the flash.
For a custom board, you will have to write your own init.cfg file with a minimal register initialization to properly configure the board's CPU and peripherals. For a starting point, you can study the init.cfg files from the CodeWarrior support directory (CodeWarrior installation folder\PowerPC_EABI_Support\Initialization_Files). Make a copy of the init.cfg file that's the closest match to your board's hardware configuration and name it my_custom_board_init.cfg. Edit this file to match your board's settings (clocks, RAM, flash, register initialization, memory initialization, and so on) exactly. Now perform a Debug->Connect command with the modified init file selected. To have the Debugger use the modified file, in the EPPC Debugger Settings panel choose Use Target Initialization file and navigate to my_custom_board_init.cfg. Then (if your SDRAM was correctly initialized), you should be able to perform debugging operations on the board.
 
The same board initialization has to be done in the stand-alone version of the project (ROM version), but from within source code. The my_custom_board_init.cfg file is only executed on the target board at the beginning of a debug session.
 
You can use the Hardware Diagnostics tool (CW menu Tools->Hardware Diagnostics) with your Target Processor, Connection, and my_custom_board_init.cfg file selected in the Hardware Diagnostics -> Configuration panel when testing RAM memory accesses on the board.
0 Kudos