A board support package for the LPC4088 Display Module.

Dependencies:   DM_HttpServer DM_USBHost

Dependents:   lpc4088_displaymodule_emwin lpc4088_displaymodule_demo_sphere sampleGUI sampleEmptyGUI ... more

Fork of DMSupport by EmbeddedArtists AB

Revision:
3:2fa7755f2cef
Parent:
0:6b68dac0d986
Child:
9:a33326afd686
--- a/Memory/SPIFI.cpp	Tue Dec 02 15:21:18 2014 +0000
+++ b/Memory/SPIFI.cpp	Wed Dec 03 16:17:10 2014 +0000
@@ -124,6 +124,10 @@
     
     // Turn on SPIFI block as it is disabled on reset
     LPC_SC->PCONP |= 0x00010000;
+      
+    // Configure clock source as Main PLL and divider 2 to get 60MHz
+    uint32_t spifi_clk_div = 2;
+    LPC_SC->SPIFICLKSEL = (1<<8) | spifi_clk_div;
 
     // pinsel for SPIFI
     LPC_IOCON->P2_7 = 5; /* SPIFI_CSN @ P2.7 */
@@ -133,7 +137,6 @@
     LPC_IOCON->P0_17 = 5; /* SPIFI_IO1 @ P0.17 */
     LPC_IOCON->P0_18 = 5; /* SPIFI_IO0 @ P0.18 */
     
-    uint32_t spifi_clk_div = (*((volatile uint32_t*)0x400FC1B4)) & 0x1f;
     uint32_t spifi_clk_mhz = (SystemCoreClock / spifi_clk_div) / 1000000;
 
     _spifi = ROM_DRIVERS_PTR->pSPIFID;