NOTICE: This website will be shut down in the near future. Product content has moved to Forum content and FAQs have been moved to We encourage you to create a user account on to use the new community forums and access NXP microcontroller content. We greatly appreciate your contributions and look forward to seeing you at our new web location.



Forum for lpc17xx devices

lpc1768 adc power down

hi, all

i am working on lpc1768 adc now, and the code to do the polling of adc works.
and then i want to use the power down of adc to minimize the current,
so i set the PDN bit(ADC_PowerDownCmd) before the adc function and clear it after adc.
i fount that the ADC_ChannelGetStatus function returns zero after ADC_StartCmd.

why? how can i let adc go to power down mode and repower it before adc function?

any help is appreciated.

Why OHCI not response when USB_OVRCR state change

Device: LPC1768

Test 1

Action: I connect wire from USB_OVRCR to ground
What happen:

  • USB_OVRCR pin state change: 1 => 0
  • OcRhPortStatus1 change: 0x00000100 => 0x00080000
  • USB_PPWR pin state change: 0 => 1
=> Overcurrent protection work. OHCI automatically turn USB port power off.

Test 2

Action: I connect write from USB +5V pin to ground (real overcurrent situation)
What happen:

  • USB_PWRD pin state change: 1 => 0
  • USB_OVRCR pin state change: 1 => 0
=> That's all. Overcurrent protection not work.

lpcxpresso loading lwip_tcpecho_freertos fail in 177x target board.

My IDE is : LPCXpresso v7.7.2 [Build 379] [2015-03-31]

Then I want to run two simple sample codes on my 1778 target board from the:


First of all, I import the projects:


The 1st sample: freertos_blinky
make the target gpio in right pull-up/pull-down state,and in/output state,1st works well.

The 2nd sample: lwip_tcpecho_freertos
Click "debug", LPC Link + target board with 1778 fail to download the program,say: 15 Target error from Commit Flash write


LPC1768FBD100 USB Host communicate with keyboards.

Attached please find the debug information. The followings are for summaries for your reference.

1. The viewer to open the USB log file.

2. If the sent data is more than one byte, there is no problem when re-sends the data.
3. The retry is done by the hardware, the software does nothing for it.
4. The phenomenon can be reproduced by the attached software and NXP ev board.

Help with can bus and VW car

Hello. Does anybody help me with this?....i wanna conect the lpcxpresso 1769 to my VW car and read the RPM values...Is this possible?...Is this very hard to do?...I wanna do this for my college project but i dont have idea about can

change PWM frequency

The code below sets up a simple 2-edged PWM signal. In my application, I need to change the frequency occasionally, which is what I THINK I am doing in the main loop, but the only change is the duty cycle. That is, the frequency always remains to what it was set at the beginning (1kHz), and only the "on" duty cycle is commensurate with the 2kHz I'm switching it to.

SPI Slave TX Underrun

I figured this has to be documented somewhere but i can't seem to find it. What exactly happens if i am running as an SPI Slave on the LPC1788 and my TX buffer is underrun?

By testing i think i have figured out what happens, but it is undesirable behavior.

What i am seeing in testing is this (SPI_MODE_1):

Master sends LPC a 5 Byte Message: t,e,s,t,Line Break
During this transmission the LPC slave sends 0's
Master then clocks out 10 lines for the LPC to respond.

Ethernet Programming -- Checksums

My project uses the EMAC block of the LPC1778 -- but presumably this peripheral is common to other NXP parts.

Because I reject any received frame with a CRC error (Ethernet level FCS), I do not bother to verify
the various checksums.

My reasoning is that if an error occured that might be detected by checksum verification, it would also
cause a CRC error at the frame level [and the CRC is much stronger than a mere checksum].

Does anyone care to comment on this strategy? Or provide a counter example.

Cheers, Mike

lpc1788, lpcopen, openocd and lpcopen-make

Im new to ARM programming, AVR 8 bit programming has been a hobby of mine for about 5 years, I have bought a development board from olimex however the example they have written is for IAR IDE and has lots of proprietry code in, and the IDE is like $2000 - I cant afford that, so I want to go open source.
This is the dev board I bought;
I have setup a ubuntu box with the above mentioned toolchain.

LPC1769 LWIP stack assert pbuf->ref=1 fail

I am running LWIP stack on LPC1769, compiler is IAR, source code is from LPCOpen 1.03 echo sample without RTOS. board is LPCXpresso board. I modified the sample to open 6 tcp server and 6 tcp client socket. the stack assert fail at pbuf->ref==1 (ip.c ln 865 ) after running a while. the timing is random, sometime after send/receive several thousand packet, sometime after several 10K packet. Is there anybody know the reason of it? attached is the opt.h and lwipopts.h Thanks.