flashphilipslpc64k.mac

来自「lpc2148 usb 数据存储」· MAC 代码 · 共 18 行

MAC
18
字号
execUserFlashInit()
{
    // Disable the PLL.
    __writeMemory32(0x00000000, 0xE01FC080, "Memory"); // PLLCON = 0
    // Qualify the PLL change.
    __writeMemory32(0x000000AA, 0xE01FC08C, "Memory"); // PLLFEED = 0xAA
    __writeMemory32(0x00000055, 0xE01FC08C, "Memory"); // PLLFEED = 0x55

    // Make sure that the flash memory system is correctly setup.
    __writeMemory32(0x00000000, 0xE01FC000, "Memory"); // MAMCR = 0
    __writeMemory32(0x00000007, 0xE01FC004, "Memory"); // MAMTIM = 7
    __writeMemory32(0x00000002, 0xE01FC000, "Memory"); // MAMCR = 2

    // If the MAM values was wrong, a dummy read is necessary to get the flash memory in sync.
    __writeMemory32(0x00000001, 0xE01FC040, "Memory"); // MEMMAP = 1
    __readMemory32(0x00000000, "Memory");
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?