Content originally posted in LPCWare by CarlMle on Wed Feb 06 10:09:37 MST 2013 I am implementing a USB CDC using the USB CDC Rom example from Lpcware.com
First issue is reliable USB_VBUS detection. I want to know if USB is plugged in either a PC or charger, So I want to read the state of the USB_VBUS pin P03. (Its a battery powered device)
Using LPC11U24/401 - LPCXpresso 5.0.14_1109
USB CDC is working and I can send + Recv Data over the CDC
No USB cable connected : P0B3=0 P0W3=0xffffffff P0PORT=0x5506bb ( BIT3 is set ) USB Connected : P0B3=0 P0W3=0xffffffff P0PORT=0x5506bb ( BIT3 is set )
So first issue is a disagreement over the pin state, as far as I can see these should all agree? As P0B3 & P0W3 are convenience registers showing the state of BIT3 of Port0. Unless with USB enabled you cant use this as a GPIO?
LPC11Ux User Manual states that the top 64 bits of an LPC11U24/401 Eeprom are reserved for NXP use. Which way is up? is it 0-63 or the last 64 bytes? I can't see a memory map that shows this.
Content originally posted in LPCWare by CarlMle on Thu Feb 07 08:03:39 MST 2013 Looks like I may have a back door circuit from my charger on to vbus, but that doesn't explain the various port registers disagreeing with each other.