LPC17XX QEI bug

08 Nov 2013

Hello! It's not mbed related, but I think there's a bug in the standard pheripheral driver, in the lpc17xx_qei.c file. Using the QEI_SetPosition function, it's fine with QEI_COMPPOS_CH_0, but when using with QEI_COMPPOS_CH_1 or else, it's will be over addressed. So this modification is reasonable.

Original

	tmp = (uint32_t *) (&(QEIx->CMPOS0) + bPosCompCh * 4);

Modified

	tmp = (uint32_t *) (&(QEIx->CMPOS0) + bPosCompCh);

Regards, Arpy