lpcware

LPC1769: MCPWM, USB and QEI

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by Pax on Sun Sep 09 13:23:38 MST 2012
Hello All,

I am planning for a project where I will use an LPC1769 to control a BLAC servo motor. The motor will be controlled from a PC via USB (the LPC1769 will be an USB device). I need to be able to read out motor position at high resolution, so I will use the QEI interface for that (which may also be used in motor commutation).

When looking through the LPC1769 user manual two things related to the above caught my attention. Hopefully someone here can verify what I have planned actually will work though.

The two potential issues:

1. Two of the motor control PWM pins are shared with USB pins (P1[19]: MCOA0 with USB_PPWR, P1[22]: MCOB0 with USB_PWRD). From the manual it seems these USB pins are only used in USB host mode though. Can someone verify that these pins are not needed at all in USB device mode?

2. Usage of the QEI inputs for both the QEI and MCPWM blocks at the same time. In the user manual (UM10360) section 26.5, MCI0-2 are stated to be connected to both the QEI and MCPWM blocks. But, I can use these inputs for motor control as well as reading out motor position via the QEI interface at the same time, right?

Thanks,

Outcomes