Content originally posted in LPCWare by bavarian on Mon Jan 13 05:39:16 MST 2014
Here are two projects for LPC1800 and for LPC4300 which use the SPIFI library under LPCXpresso 6.
- import the files into the workspace and make a 'Build all'
- SPIFI libraries compile without error under GCC
- Code runs from SPIFI, using the LPC1830/4330 LPCXplorer board
- function spifi_init(...) is used to initialize the SPIFI
- SPIFI speed is set to 90MHz
- some data is programmed into the qSPI
- after a successful SPIFI write the application runs into a blinky loop
Further notes:
- the code example uses the libraries coming with LPCXpresso, these are different to the new structure from LPCOpen. These libs are a little bit outdated and will not be maintained anymore.
- if you are doing any new code development, then you should consider to port the SPIFI setup from this example into the current LPCOpen platform
- NXP will add a SPIFI setup in one of the next LPCOpen releases for LPC1800/4300
Regards
NXP Support Team
Original Attachment has been moved to: LPC43xx_SPIFI_LPCXpresso6_1.zip
Original Attachment has been moved to: LPC18xx_SPIFI_LPCXpresso6_1.zip
Chip_Clock_SetDivider(CLK_IDIV_E, CLKIN_MAINPLL, 4); /* Pick a source and divider here to get as close as possible to your desired rate */ Chip_Clock_SetBaseClock(CLK_BASE_SPIFI, CLKIN_IDIVE, true, false); /* Attach SPIFI clock to CLK_IDIV_E */ |
/* SPIFI high speed pin mode setup */ STATIC const PINMUX_GRP_T spifipinmuxing[] = { {0x3, 3, (SCU_PINIO_FAST | SCU_MODE_FUNC3)},/* SPIFI CLK */ {0x3, 4, (SCU_PINIO_FAST | SCU_MODE_FUNC3)},/* SPIFI D3 */ {0x3, 5, (SCU_PINIO_FAST | SCU_MODE_FUNC3)},/* SPIFI D2 */ {0x3, 6, (SCU_PINIO_FAST | SCU_MODE_FUNC3)},/* SPIFI D1 */ {0x3, 7, (SCU_PINIO_FAST | SCU_MODE_FUNC3)},/* SPIFI D0 */ {0x3, 8, (SCU_PINIO_FAST | SCU_MODE_FUNC3)}/* SPIFI CS/SSEL */ }; Chip_SCU_SetPinMuxing(spifipinmuxing, sizeof(spifipinmuxing) / sizeof(PINMUX_GRP_T)); |