Hi,
Please correct me if my understanding of programming the LPC1768 is wrong - there are 2 ways to do it, one via JTAG (OpenOCD), or another way is via through serial communication.
I have chose the latter for my project using USB-to-serial comm - I have soldered an FT2232 together with all the required components and I have both Channel A and Channel B connected to TXD0/RXD0 and TXD2/RXD2 of my LPC1768 processor. Previously, whenever I connected it to the PC, 2 different COM ports will appear, and I had no problems sending data from the PC to FT2232. (I tried to type something from the Hyperterminal and the TXLED for the appropriate channels would light up).
I was more ambitious then and badly wanted to do a simple echo program, where anything I typed would be displayed on the Hyperterminal. As such, I googled for a UART program for LPC17xx, and I found this:
http://code.google.com/p/32bitmicro/sou … ART/?r=116
However, the Makefile, when compiled in my Eclipse, gave me an error about the “include …/Makefile.rules” part. As such, I have used the Makefile by Sagar G V - this is the link: http://code.google.com/p/cortex-m3-tuto … r&can=2&q=
All this while, neither my RTC nor my Main Oscillator (12MHz crystal) was soldered onto the PCB yet.
Unfortunately, although it did work once on Hyperterminal, I was unable to get the COM port for Channel B to appear again. Worst, FlashMagic kept giving me the error “Failed to autobaud” even when I tried to flash via Channel A.
Now, upon reading the LPC17xx manual, it did mention that the LPC17xx would only switch to the main crystal only via software. However, if we try to flash it via FlashMagic, doesn’t FlashMagic require us to define the crystal used - hence, how can they make use of this crystal when it has to be programmed by software? In any case, when I tried probing it using an oscilloscope, the 32.768kHz RTC appeared correctly, but I couldn’t get the 12MHz main oscillator to work. As for the FT2232D, the 6MHz crystal used also appears correctly upon probing using an oscilloscope.
============================================================================