Forum for lpc17xx devices

What are the minimum hardware (pin) lines required for host (USB1) [No OTG] on the 1778?

On our custom board, what are the minimum processor pins I need to connect to get a USB host port (USB1) I don't care about over current or power enable as I intend to connect 5V permanently to the type A connector's Vbus pin.

I'm only ever going to plug in a USB flash drive for firmware update.

The UM10470 appears to imply that USB1_PWRD must be configured. Is this the case (I don't want any OTG stuff). If needed, can I tie to 5V (or 3.3V?) Or can I just enable the built in pull up?

lpc1788 SPI

Please help me:
I'm try read info from eeprom mxic, connected to SSP0 at pins p0.15-18.
CS from eeprom i connect to ground.
I get SSP driver from CMSIS, and try send CMD's to eeprom, but not good - i get two 0x00ff Sad


Proper PLL Calculator for LPC177x/178x

The 17xx PPL Calculator on the NXP site is only useful for 176x etc. As the 177x and 178x
have a very different (and brain damaged) PLL block.

So I have made a first stab at a 177x/178x specific calculator.

As I am mostly a novice with Excel (and only have Excel97) I don't know how to colour cells with Clock speeds that are legal but unobtainable (because no legal Fosc exists).

So only use results on rows where there is a legal Fosc value in the left hand grid.

To use, just enter the crystal speed (in MHz). E.g. 12 for 12Mhz, or 18.432 etc.

USB Host questions for 1788

Hi All

I'm trying to get USB Host to work on my LPC1788. I'm using port 2 as host.

I use the USBHost lite sample from NXP

What I have changed:

The port pin setup to use the USB port 2
The base address to match the lpc1788 mem map. (0x2000 0000)
Added Port 2 stuff to the IRQ handler (LPC_USB->RhPortStatus2 control etc.)

What do work:

When I insert an USB stick, the IRQ get called and handle interrupt for port 2
The HOST_RhscIntr get set and the Host_EnumDev function continue.
The RhPortStatus2 get reset
The Host_ProcessTD gets called.

lpc1788: UART with 3 Mbaud - receiver not working


As the title says I have a problem with receiving data at higher speeds. I have tested the UART with the speed of 3 Mbaud and sending data is not a problem. The reason for trying out the 3 Mbaud is that the FTDI chip which the UART is connected to supports those speeds.
So when I try to receive data with the normal RBR interrupt I can receive data, but only the first byte is correct, the rest is completely wrong, not just single bits. I found that plausible because the whole interrupt would need less than 40 cycles to finish to not lose any data, possibly less.

RTC stops on LPC1768

Dear Sir/Madam,

for the first time we use the RTC on the LPC1768 in a new product.

XTAL1 and XTAL2 pins are connected to a quartz crystal 32.768KHz.
Additionally each pin has one 22pF capacitor to ground.
Tuning Fork Crystal Specifications:
Series resistance: max. 40k Ohm
Load capacitance: 12.5pF
A CR2032 lithium battery is used for alternative power supply for the RTC.

Unfortunately, the RTC often stops when the 3.3V main power supply was turned on.
Likewise, it is possible to "blow out the RTC", even without halitosis. Wink

Replacing the quartz has not helped.

LPC1778, IS42S16400F SRAM problems...

I seem to have run into some of the same problems as some other users of the LPC1778...
I have been reading all the threads regarding the SDRAM setup, but so far without success.
I have a custom designed board (everything in BGA, so a little hard to probe ;)), CPU is LPC1778, SDRAM is a ISSI IS42S16400F (64 Mbit in 16 bit mode). I have been testing various setups from the NXP samples, but is stuck!

AHB Arbitration Register

We have currently in Production the LCP2478 with 7" screen working fine. There was an issue with screen tear on the screen initially, however after setting up the AHBCFG1 Register on the LPC2478 things work fine.

AHBCFG1 = (0x0 << 31) // 31 - reserved
| (0x5 << 28) // 30:28 - Priority for LCD
| (0x0 << 27) // 27 - reserved
| (0x1 << 24) // 26:24 - Priority for USB
| (0x0 << 23) // 23 reserved
| (0x2 << 20) // 22:20 - Priority for AHB1

lwIP hardfault

Dear All

I sometimes have some hard fault in the lwIP stack.
I have tried debugging it and have seen this

The hard-fault error happen in the lpc_low_level_input function line 414

/* Free pbuf from desriptor */
lpc_enetif->rxb[idx] = NULL; <-- Hard fault on this!!!

This only happens, if the previous call to lpc_rx_queue failed with a pbuf_alloc error

In the case the pbuf_alloc fails, no pbuf is queued. Thereby the
lpc_enetif->prxd[idx].control, lpc_enetif->rxb[idx] etc isn't set.

LPC1788 + emWin + FreeRTOS


I'm trying to make a project with emWin and FreeRTOS. It works fine for some time. But always programm stops (loop forever) on:

/* *** NOTE ***********************************************************
If you find your application is crashing here then likely causes are:
1) Stack overflow -
see http://www.freertos.org/Stacks-and-stack-overflow-checking.html
2) Incorrect interrupt priority assignment, especially on Cortex-M3
parts where numerically high priority values denote low actual