__Setup() { /* set SPIFI clock */ //LPC_CGU->BASE_SPIFI0_CLK = 1<<24 | 1<<11; /* IRC 12 MHz is good enough for us */ __writeMemory32( 1<<24 | 1<<11, 0x40051304, "Memory"); //LPC_SCU->SFSP3_3 = 0xF3; /* high drive for SCLK */ __writeMemory32( 0xF3, 0x4008618C, "Memory"); /* IO pins */ //LPC_SCU->SFSP3_4=LPC_SCU->SFSP3_5=LPC_SCU->SFSP3_6=LPC_SCU->SFSP3_7 = 0xD3; __writeMemory32( 0xD3, 0x40086190, "Memory"); __writeMemory32( 0xD3, 0x40086194, "Memory"); __writeMemory32( 0xD3, 0x40086198, "Memory"); __writeMemory32( 0xD3, 0x4008619C, "Memory"); //LPC_SCU->SFSP3_8 = 0x13; /* CS doesn't need feedback */ __writeMemory32( 0x13, 0x400861A0, "Memory"); __writeMemory32(0x14000000, 0x40043100, "Memory"); // map SPIFI to shadow area at address 0 } execUserReset() { __message "----- execUserReset\n"; __Setup(); } execUserFlashInit(){ __message "----- execUserFlashInit\n"; __Setup(); }