lpcware

lpcopen v2.10 lpc17xx EMC driver

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by wella-tabor on Fri Feb 06 01:17:18 MST 2015
Hello,

could you somehow correct the driver for lpc17xx EMC? The function
/**
* @briefInitialize EMC
* @paramEnable: 1 = Enable, 0 = Disable
* @paramClockRatio: clock out ratio, 0 = 1:1, 1 = 1:2
* @paramEndianMode: Endian Mode, 0 = Little, 1 = Big
* @returnNone
*/
void Chip_EMC_Init(uint32_t Enable, uint32_t ClockRatio, uint32_t EndianMode);

/* Initialize EMC */
void Chip_EMC_Init(uint32_t Enable, uint32_t ClockRatio, uint32_t EndianMode)
{
LPC_EMC->CONFIG    = (EndianMode ? 1 : 0) | ((ClockRatio ? 1 : 0) << 8);

/* Enable EMC 001 Normal Memory Map, No low power mode */
LPC_EMC->CONTROL     = (Enable ? 1 : 0);
}


is not able to set 1:2 clock out ratio. Even, it even makes the EMC not working properly, see the UM 10470
8 - Reserved. This bit must contain 0 for proper operation of the EMC.


Best
Martin

Outcomes