Archive for September, 2013
I had some problems getting my ROV on-board controller (which uses a LPC1347) programmed from LPCXpresso.
After doing the research I should have done before I had the PCBs made (doh), I found out I had messed up the SWD programming/debugging connections.
And so, in order to spare anyone else the same trouble, here is a small recap of which wires to connect to what.
Connections from LPC11U24/LPC1347
These are the minimal connections from the MCU to the LPC-Link:
|Pin name||LQFP48 pin no.||Connect to|
|#RESET/PIO0_0||3||SWD pin 10 (#RST)|
|SWDIO/PIO0_15/AD4/ 25 CT32B1_MAT2||39||SWD pin 2|
|SWCLK/PIO0_10/SCK0/CT16B0_MAT2||29||SWD pin 4|
Note: It is not necessary to have pull-up resistor on #RESET (or any other pin) unless other parts of the circuit might affect the levels since it is internally pulled up to VDD.
Connections from JTAG/SWD
These are the minimal connections from the LPC-Link to the MCU board.
|Pin number||Connect to||LQFP48 pin no.||Comment|
|1||3.3V on MCU||8, 44|
|3||n/c||Optional GND (see note 1)|
|5||n/c||Optional GND (see note 1)|
|6||n/c||Optional SWO (see note 2)|
Note 1: It is sufficient to connect one of the GND pins (e.g. SWD pin 9) as pins 3, 5 and 9 are all connected on the LPC-Link.
Note 2: SWD pin 6 can be connected to PIO0_9/MOSI0/CT16B0_MAT1/SWO (LQFP pin 28) but this is not required.
This image shows the pin numbering on the LPC-Link. Pin 1 has been marked in red.
Do yourself a favor and perform a continuity check from the LPC-Link side to your MCU board to make sure which pins go where.
Be aware that the 0.1" pins on the right edge of the board do not follow the JTAG pin numbering but have these connections:
- EXT. PWR
The required pins are 1, 2, 3, 6 and 8.
Sometimes LPCXpresso can't initialize the LPC-Link even though it is connected. I have found that following the following procedure works every time:
- Launch LPCXpresso IDE
- Power up device
- Attach to LPC-Link
- Connect LPC-Link to computer by USB
- Debug firmware from LPCXpresso
UPDATE: BLE112 firmware source code can be downloaded here: BLE112 iBeacon firmware. It should be pretty well documented so please try to figure it out yourself before asking :)
Here's a snap of the first two "production" iBeacons (not really production models but a lot prettier than the previous mess-o-wires prototype). They are based on BLE112 Bluetooth modules and contains nothing more than a coin cell battery, a tiny DIP switch for configuring the device identifier without re-flashing the firmware, a capacitor and a diode for reverse polarity protection when external power is used instead of the coin cell battery. And a BLE112 module, of course.
Here are the Eagle files for schematic and board:
The firmware source code can be downloaded here: BLE112 iBeacon firmware.