ISP example program.
Dependencies: SLCD mbed USBLocalFileSystem
FRDM-KL46Z | LPC810 | |
---|---|---|
UART RXD | PTE23 | p2(P0_4) |
UART TXD | PTE22 | p8(P0_0) |
nRESET | D6 | p1(P0_5) |
nISP | D8 | p5(P0_1) |
GND | GND | p7 |
3.3V | P3V3 | p6 |
Copy binary image to the disk called LPC81ISP.
Push sw1 or sw3, start write to LPC810 flash.
Diff: main.cpp
- Revision:
- 1:cccfc461c61f
- Parent:
- 0:ad2b1fc04955
- Child:
- 2:eafc1c6787c7
--- a/main.cpp Sat Feb 15 10:15:42 2014 +0000 +++ b/main.cpp Sun Feb 16 12:56:12 2014 +0000 @@ -1,3 +1,4 @@ +#ifdef TARGET_KL46Z #include "RamDisk.h" #include "Storage.h" #include "BaseLpcIsp.h" @@ -42,7 +43,7 @@ sw3.rise(swIRQ); RamDisk* ramdisk = new RamDisk; - USBStorage* usb = new USBStorage(ramdisk); + USBStorage2* usb = new USBStorage2(ramdisk); LocalStorage* local = NULL; slcd.puts("REDY"); write_start = false; @@ -63,6 +64,12 @@ } write_start = false; } + if (usb->readable()) { + lpc.putc(usb->getc()); + } + if (lpc.readable()) { + usb->putc(lpc.getc()); + } if (pc.readable()) { switch(pc.getc()) { case 'd': ramdisk->dump(0); break; @@ -72,3 +79,4 @@ } } } +#endif