Content originally posted in LPCWare by lturcotte on Tue Jan 07 10:18:43 MST 2014
Hi
The code sample related to SDRAM were not working in LPCopen 2.04 ( EMWIN, memtest ...)
the problem was related to the configuration in Board_SetupMuxing. incorrect configuration of clock pin muxing
from file: Board_sysinit.c
/* Sets up system pin muxing */
void Board_SetupMuxing(void)
{
#if 0
// original code
int i;
/* Setup system level pin muxing */
Chip_SCU_SetPinMuxing(pinmuxing, sizeof(pinmuxing) / sizeof(PINMUX_GRP_T));
/* Clock pins only */
Chip_SCU_SetPinMuxing(pinclockmuxing, sizeof(pinclockmuxing) / sizeof(PINMUX_GRP_T));
#else
// working code
int i;
Chip_SCU_SetPinMuxing(pinmuxing, sizeof(pinmuxing) / sizeof(PINMUX_GRP_T));
/* Clock pins only, group field not used */
for (i = 0; i < (sizeof(pinclockmuxing) / sizeof(pinclockmuxing[0])); i++) {
Chip_SCU_ClockPinMuxSet(pinclockmuxing.pinnum, pinclockmuxing.modefunc);
}
#endif
}