📄 at91_eb55_startup.mac
字号:
// File: at91_startup.mac
//
// This file will put the AT91 in protected mode to allow debugger
// windows showing register and memory content to read the AIC controller
// without interfering with the AIC interrupt controller.
// This must be done before execution of the program to allow for the
// case when a window showing AIC content is active when the debugger starts.
// The EB55 PLL and memory controller is initialized and a REMAP
// command executed.
//
// $Revision: 1.2 $
execUserPreload()
{
__message "Init Macro: Setup AT91EB55\n";
__message "Setup PLL\n";
__writeMemory32(0x002F0002,0xffff4020,"Memory"); // MOSCEN = 1, OSCOUNT = 47
__writeMemory32(0x002F4002,0xffff4020,"Memory"); // MOSCEN = 1, OSCOUNT = 47 // Commuting from Slow Clock to Main Oscillator (16Mhz)
__writeMemory32(0x032F4102,0xffff4020,"Memory"); // MUL = 1, PLLCOUNT = 3, CSS = 1 // Setup the PLL to 32 MHz clock
__writeMemory32(0x032F8102,0xffff4020,"Memory"); // CSS = 2, MUL = 1 // Commuting from 16Mhz to PLL @ 32MHz
__message "AIC set to protected mode, __SF_PMR = 0x27a80020\n";
__writeMemory32(0x27a80020, 0xfff00018, "Memory");
__message "Setup memory controller, do remap command\n";
// Flash at 0x01000000, 16MB, 2 hold, 16 bits, 4 WS
__writeMemory32(0x0100252d, 0xffe00000, "Memory");
// RAM at 0x02000000, 16MB, 0 hold, 16 bits, 1 WS
__writeMemory32(0x02002121, 0xffe00004, "Memory");
// unused
__writeMemory32(0x20000000, 0xffe00008, "Memory");
// unused
__writeMemory32(0x30000000, 0xffe0000c, "Memory");
// unused
__writeMemory32(0x40000000, 0xffe00010, "Memory");
// unused
__writeMemory32(0x50000000, 0xffe00014, "Memory");
// unused
__writeMemory32(0x60000000, 0xffe00018, "Memory");
// unused
__writeMemory32(0x70000000, 0xffe0001c, "Memory");
// REMAP command
__writeMemory32(0x00000001, 0xffe00020, "Memory");
// standard read
__writeMemory32(0x00000006, 0xffe00024, "Memory");
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -