Computing stuff tied to the physical world

ARM to ARM serial connection

In Hardware, Linux, ARM on Sep 26, 2012 at 00:01

After connecting a JeeNode to a Raspberry Pi, let’s do the same with the LPCXpresso I mentioned a while back. Let’s do it in such a way that we can upload new code into it.

With an LPC1769, this is even simpler than with an ATmega328, because the serial boot loader is built-into the chip out of the box. No need to install anything. So you can always force the chip back into serial boot loader mode – it can’t be “bricked” !

But the process is slightly different: you have to pull down a specific “ISP” pin while resetting the chip, to make it enter serial boot loader mode. So we’ll need one more GPIO pin, for which I’ll use the RPi’s GPIO 23. The wiring is even cleaner than before, because this time I planned a bit more ahead of time:

DSC 4156

Except that this runs into the same problem as before. The LPCXpresso does not have the essential 3.3V regulator next to the ARM chip, it’s on the part that has been cut off (doh!). So again, I’m going to have to add an SMD MCP1703 regulator:

DSC 4157

(that little critter is between pins 1 and 2, and upside down, to get the pinout right)

Here’s the complete hookup:

DSC 4159

First step is again to make sure that Linux isn’t doing anything with the serial port:

  • remove the two args referring to /dev/ttyAMA0 in the file /boot/cmdline.txt

  • add a hash (“#”) in front of this line in /etc/inittab to comment it out:

    T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
  • make the system aware of the changes in inittab with: kill -1 1 (or reboot)

Tomorrow, I’ll go into actually uploading to that LPC1769 ARM board. Stay tuned!

Note – As of October 1st, VAT prices in the Netherlands will increase from 19% to 21%. As a consequence some adjustments will also have to be made in the JeeLabs Shop. Up or down depends on many obscure factors, including exchange rates, current costs, stock levels, and the wish to stick to decently rounded values – so if you want to avoid any surprises and were planning to order stuff, please keep that switch-over date in mind.

  1. The R-Pi provides a regulated 3.3V also, although I assume you want more current than the 50 mA you are allowed to draw from the P1-01 pin.

    • Yes – and the 8-pin single-row header is nice. And the ability to work with a std 5V BUB is also nice.

  2. It looks like the Rpi could be a rather useful mobile sketch uploader to those fixed and mounted microcontrollers you have dotted about – assuming there’s an ISP socket or FTDI accessible.

    Loads of storage on the SD card. A couple of LEDs on the GPIO for status, a rotary encoder switch to pick a sketch number and a “GO!!!” button.

    I wonder, as the Rpi’s ARM runs on 3.3v, will it actually play ball if you fed it 3.7v from an Li-ion instead of the 5v it normally receives?

  3. The schematic shows the venerable NCP1117 regulator which is classed as low drop out. However connecting throught the micro USB puts the problematic resetable fuse in series – not enough headroom for comfort I fear. (The ‘5.0V’ rail is accessible for a direct connection though for the brave)

  4. If you want to avoid any extra surprises, you should also disable the SysRq functionality. It’s enabled on most distros by default, but it can have some weird interactions if it sees the right magic byte sequence on the serial port, even if you’ve disabled logins there.

    add “kernel.sysrq=0” to /etc/sysctl.conf

    You won’t see this very often, but when you do, it’s as confusing as the !!! bug in some arduinos when you do hit it:

Comments are closed.