| |||||
Technical Support Support Resources
Product Information | ULINK: TROUBLE WITH FLASH PROGRAMMINGInformation in this article applies to:
QUESTIONI am using a custom board based on the Atmel AT91RM9200-DK schematics. The board has just a single Micron MT48LC4M32B2-7 SDRAM part (with 16 Mbyte) instead of two devices. I have started using the Keil example in the folder ..\ARM\RV30\Boards\Atmel\AT91RM9200-EK and I have adapted the Ext_RAM.ini file to reflect the changes in my SDRAM configuration (the only difference is the number of rows = 12). The content of the Ext_RAM.ini is now:
FUNC void Setup (void) {
_WDWORD(0xFFFFF804, 0xFFFF0000); // PIOC_PDR: Enable Peripheral Mode
_WDWORD(0xFFFFFF60, 0x00000002); // EBI_CSA: CSA1 support for SDRAM
_WDWORD(0xFFFFFF98, 0x2188C154); // Init SDRAM
_WDWORD(0xFFFFFF90, 0x00000002);
_WDWORD(0x20000000, 0);
_WDWORD(0xFFFFFF90, 0x00000004);
_WDWORD(0x20000000, 0);
_WDWORD(0x20000000, 0);
_WDWORD(0x20000000, 0);
_WDWORD(0x20000000, 0);
_WDWORD(0x20000000, 0);
_WDWORD(0x20000000, 0);
_WDWORD(0x20000000, 0);
_WDWORD(0x20000000, 0);
_WDWORD(0xFFFFFF90, 0x00000003);
_WDWORD(0x20000080, 0);
_WDWORD(0xFFFFFF94, 0x000002E0);
_WDWORD(0x20000000, 0);
_WDWORD(0xFFFFFF90, 0x00000000);
_WDWORD(0x20000000, 0);
// Program Entry Point
PC = 0x20000000;
}
// Switching from Slow Clock to Main Oscillator for faster Download
_WDWORD(0xFFFFFC20, 0x00000601); // PMC_MOR: Enable Main Oscillator
_sleep_(10); // Wait for stable Main Oscillator
_WDWORD(0xFFFFFC30, 0x00000001); // PMC_MCKR: Switch to Main Oscillator
Setup(); // Setup for Init
LOAD Ext_RAM\Blinky.axf INCREMENTAL // Download
g, main
When I start the debugger I get the message: Ulink ARM Error, Memory Mismatch! Address: 0x20000000, Value = 0x75, Expected = 0x18 But when I look into the memory it appears that the code is loaded correctly into SDRAM twice at 0x20000000 and also at 0x21000000. What can be the mistake? ANSWERThe setup with the Ext_RAM.ini is not the only change required. The board you have developed has only 16MB (size: 0x01000000 bytes) of SDRAM whereas the Atmel AT91RM9200-EK board has 32MB (size: 0x02000000 bytes). For your board, the SDRAM is located from 0x20000000 to 0x21000000. Therefore, you need to change the settings under Project - Options for Target - Target to: ROM1 Start: 0x20000000 Size 0x800000 ROM2 Start: 0x20800000 Size 0x800000 Next, you need to change the Flash Programming algorithm under Project - Options for Target - Utilities - ULINK Settings. Remove the current algorithm and add the algorithm for your device (which is the AT49xV32xT). MORE INFORMATION
Last Reviewed: Sunday, January 28, 2007 | ||||
| |||||