LPC1768 Status, flashing, and uart0

Hi.

I could compile my application (a couple of printf within two threads). I’d like to test it on a ebay simple LPC1768 board.

What is the correct way to flash this chip, and what are the correct pins for the serial uart0.

Thanks.

Hi Olivier,

I assume you are talking about this mbed-lpc1768 board [1]? Flashing should work via RIOTs make system: just connect the board, switch into your RIOT application folder (e.g. default) and call ‘make flash’ after building:

connect the board via USB #cd …/RIOT/examples/default #BOARD=mbed_lpc1768 make clean all flash

afterwards just call ‘make term’, this will open a serial. The uart0 is normally mapped to the onboard virtual UART port, so that there is no need to connect an external UART adapter.

If the flash script does not work for (which happens on some Linux or Mac systems), you can alternatively just copy over the binary manually. Copy the RIOT/examples/default/bin/default.bin to the drive, that is automatically created when plugging in the mbed board.

Please note: the support for the mbed board is very rudimentary at the moment, so don’t expect too much :slight_smile:

Cheers, Hauke

[1]

Hi Hauke,

I’m working with ‘NXP LPC1768 minimum System Board Core Board’ from ebay:

http://www.ebay.fr/itm/NXP-LPC1768-minimum-System-Board-Core-Board-/170896978026?pt=LH_DefaultDomain_0&hash=item27ca40f06a

When I press KEY1 Button and plug USB at the same time, the USB drive “CRP DISABLE” shows up. Then I copy my firmware.bin file.

Is that correct ?

What are the next step ?

  • Should I power cycle the chip after firmware copy ?
  • What time the virtual serial port should appear ?

… because I have usb errors when I power cycle the chipset:

977.740706] usb 1-1: new full-speed USB device number 9 using xhci_hcd [ 977.900894] usb 1-1: device descriptor read/64, error -71 [ 978.164385] usb 1-1: device descriptor read/64, error -71 [ 978.427916] usb 1-1: new full-speed USB device number 10 using xhci_hcd [ 978.587998] usb 1-1: device descriptor read/64, error -71 [ 978.851545] usb 1-1: device descriptor read/64, error -71 [ 979.114947] usb 1-1: new full-speed USB device number 11 using xhci_hcd [ 979.115136] usb 1-1: Device not responding to setup address. [ 979.318659] usb 1-1: Device not responding to setup address. [ 979.521874] usb 1-1: device not accepting address 11, error -71 [ 979.681964] usb 1-1: new full-speed USB device number 12 using xhci_hcd [ 979.682184] usb 1-1: Device not responding to setup address. [ 979.885623] usb 1-1: Device not responding to setup address. [ 980.088860] usb 1-1: device not accepting address 12, error -71 [ 980.088894] usb usb1-port1: unable to enumerate USB device

… maybe the virtual consoles are not supported in Linux …

Hi Olivier,

actually I have never used/looked at that board, so I can sadly not really help you setting it up. If it is similar to the mbed-lpc1768 board, it should actually register with Linux as flash storage device and also as virtual UART device.

I can’t really tell from your dump what the problem with your device is, looks like your computer is unable to read from the USB device. Maybe google can help you further?

Sorry I can’t give you much better help!

Cheers, Hauke