ISP example program.

Dependencies:   SLCD mbed USBLocalFileSystem

/media/uploads/va009039/lpc81isp-360x240.jpg

FRDM-KL46ZLPC810
UART RXDPTE23p2(P0_4)
UART TXDPTE22p8(P0_0)
nRESETD6p1(P0_5)
nISPD8p5(P0_1)
GNDGNDp7
3.3VP3V3p6

Copy binary image to the disk called LPC81ISP.
Push sw1 or sw3, start write to LPC810 flash.

Committer:
va009039
Date:
Sat Feb 15 10:15:42 2014 +0000
Revision:
0:ad2b1fc04955
first commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
va009039 0:ad2b1fc04955 1 /*---------------------------------------------------------------------------/
va009039 0:ad2b1fc04955 2 / FatFs - FAT file system module configuration file R0.09a (C)ChaN, 2012
va009039 0:ad2b1fc04955 3 /----------------------------------------------------------------------------/
va009039 0:ad2b1fc04955 4 /
va009039 0:ad2b1fc04955 5 / CAUTION! Do not forget to make clean the project after any changes to
va009039 0:ad2b1fc04955 6 / the configuration options.
va009039 0:ad2b1fc04955 7 /
va009039 0:ad2b1fc04955 8 /----------------------------------------------------------------------------*/
va009039 0:ad2b1fc04955 9 #ifndef _FFCONF
va009039 0:ad2b1fc04955 10 #define _FFCONF 4004 /* Revision ID */
va009039 0:ad2b1fc04955 11
va009039 0:ad2b1fc04955 12 #define FFS_DBG 0
va009039 0:ad2b1fc04955 13
va009039 0:ad2b1fc04955 14 /*---------------------------------------------------------------------------/
va009039 0:ad2b1fc04955 15 / Functions and Buffer Configurations
va009039 0:ad2b1fc04955 16 /----------------------------------------------------------------------------*/
va009039 0:ad2b1fc04955 17
va009039 0:ad2b1fc04955 18 #define _FS_TINY 0 /* 0:Normal or 1:Tiny */
va009039 0:ad2b1fc04955 19 /* When _FS_TINY is set to 1, FatFs uses the sector buffer in the file system
va009039 0:ad2b1fc04955 20 / object instead of the sector buffer in the individual file object for file
va009039 0:ad2b1fc04955 21 / data transfer. This reduces memory consumption 512 bytes each file object. */
va009039 0:ad2b1fc04955 22
va009039 0:ad2b1fc04955 23
va009039 0:ad2b1fc04955 24 #define _FS_READONLY 0 /* 0:Read/Write or 1:Read only */
va009039 0:ad2b1fc04955 25 /* Setting _FS_READONLY to 1 defines read only configuration. This removes
va009039 0:ad2b1fc04955 26 / writing functions, f_write, f_sync, f_unlink, f_mkdir, f_chmod, f_rename,
va009039 0:ad2b1fc04955 27 / f_truncate and useless f_getfree. */
va009039 0:ad2b1fc04955 28
va009039 0:ad2b1fc04955 29
va009039 0:ad2b1fc04955 30 #define _FS_MINIMIZE 0 /* 0 to 3 */
va009039 0:ad2b1fc04955 31 /* The _FS_MINIMIZE option defines minimization level to remove some functions.
va009039 0:ad2b1fc04955 32 /
va009039 0:ad2b1fc04955 33 / 0: Full function.
va009039 0:ad2b1fc04955 34 / 1: f_stat, f_getfree, f_unlink, f_mkdir, f_chmod, f_truncate and f_rename
va009039 0:ad2b1fc04955 35 / are removed.
va009039 0:ad2b1fc04955 36 / 2: f_opendir and f_readdir are removed in addition to 1.
va009039 0:ad2b1fc04955 37 / 3: f_lseek is removed in addition to 2. */
va009039 0:ad2b1fc04955 38
va009039 0:ad2b1fc04955 39
va009039 0:ad2b1fc04955 40 #define _USE_STRFUNC 0 /* 0:Disable or 1-2:Enable */
va009039 0:ad2b1fc04955 41 /* To enable string functions, set _USE_STRFUNC to 1 or 2. */
va009039 0:ad2b1fc04955 42
va009039 0:ad2b1fc04955 43
va009039 0:ad2b1fc04955 44 #define _USE_MKFS 1 /* 0:Disable or 1:Enable */
va009039 0:ad2b1fc04955 45 /* To enable f_mkfs function, set _USE_MKFS to 1 and set _FS_READONLY to 0 */
va009039 0:ad2b1fc04955 46
va009039 0:ad2b1fc04955 47
va009039 0:ad2b1fc04955 48 #define _USE_FORWARD 0 /* 0:Disable or 1:Enable */
va009039 0:ad2b1fc04955 49 /* To enable f_forward function, set _USE_FORWARD to 1 and set _FS_TINY to 1. */
va009039 0:ad2b1fc04955 50
va009039 0:ad2b1fc04955 51
va009039 0:ad2b1fc04955 52 #define _USE_FASTSEEK 0 /* 0:Disable or 1:Enable */
va009039 0:ad2b1fc04955 53 /* To enable fast seek feature, set _USE_FASTSEEK to 1. */
va009039 0:ad2b1fc04955 54
va009039 0:ad2b1fc04955 55
va009039 0:ad2b1fc04955 56
va009039 0:ad2b1fc04955 57 /*---------------------------------------------------------------------------/
va009039 0:ad2b1fc04955 58 / Locale and Namespace Configurations
va009039 0:ad2b1fc04955 59 /----------------------------------------------------------------------------*/
va009039 0:ad2b1fc04955 60
va009039 0:ad2b1fc04955 61 #define _CODE_PAGE 858
va009039 0:ad2b1fc04955 62 /* The _CODE_PAGE specifies the OEM code page to be used on the target system.
va009039 0:ad2b1fc04955 63 / Incorrect setting of the code page can cause a file open failure.
va009039 0:ad2b1fc04955 64 /
va009039 0:ad2b1fc04955 65 / 932 - Japanese Shift-JIS (DBCS, OEM, Windows)
va009039 0:ad2b1fc04955 66 / 936 - Simplified Chinese GBK (DBCS, OEM, Windows)
va009039 0:ad2b1fc04955 67 / 949 - Korean (DBCS, OEM, Windows)
va009039 0:ad2b1fc04955 68 / 950 - Traditional Chinese Big5 (DBCS, OEM, Windows)
va009039 0:ad2b1fc04955 69 / 1250 - Central Europe (Windows)
va009039 0:ad2b1fc04955 70 / 1251 - Cyrillic (Windows)
va009039 0:ad2b1fc04955 71 / 1252 - Latin 1 (Windows)
va009039 0:ad2b1fc04955 72 / 1253 - Greek (Windows)
va009039 0:ad2b1fc04955 73 / 1254 - Turkish (Windows)
va009039 0:ad2b1fc04955 74 / 1255 - Hebrew (Windows)
va009039 0:ad2b1fc04955 75 / 1256 - Arabic (Windows)
va009039 0:ad2b1fc04955 76 / 1257 - Baltic (Windows)
va009039 0:ad2b1fc04955 77 / 1258 - Vietnam (OEM, Windows)
va009039 0:ad2b1fc04955 78 / 437 - U.S. (OEM)
va009039 0:ad2b1fc04955 79 / 720 - Arabic (OEM)
va009039 0:ad2b1fc04955 80 / 737 - Greek (OEM)
va009039 0:ad2b1fc04955 81 / 775 - Baltic (OEM)
va009039 0:ad2b1fc04955 82 / 850 - Multilingual Latin 1 (OEM)
va009039 0:ad2b1fc04955 83 / 858 - Multilingual Latin 1 + Euro (OEM)
va009039 0:ad2b1fc04955 84 / 852 - Latin 2 (OEM)
va009039 0:ad2b1fc04955 85 / 855 - Cyrillic (OEM)
va009039 0:ad2b1fc04955 86 / 866 - Russian (OEM)
va009039 0:ad2b1fc04955 87 / 857 - Turkish (OEM)
va009039 0:ad2b1fc04955 88 / 862 - Hebrew (OEM)
va009039 0:ad2b1fc04955 89 / 874 - Thai (OEM, Windows)
va009039 0:ad2b1fc04955 90 / 1 - ASCII only (Valid for non LFN cfg.)
va009039 0:ad2b1fc04955 91 */
va009039 0:ad2b1fc04955 92
va009039 0:ad2b1fc04955 93
va009039 0:ad2b1fc04955 94 #define _USE_LFN 0 /* 0 to 3 */
va009039 0:ad2b1fc04955 95 #define _MAX_LFN 255 /* Maximum LFN length to handle (12 to 255) */
va009039 0:ad2b1fc04955 96 /* The _USE_LFN option switches the LFN support.
va009039 0:ad2b1fc04955 97 /
va009039 0:ad2b1fc04955 98 / 0: Disable LFN feature. _MAX_LFN and _LFN_UNICODE have no effect.
va009039 0:ad2b1fc04955 99 / 1: Enable LFN with static working buffer on the BSS. Always NOT reentrant.
va009039 0:ad2b1fc04955 100 / 2: Enable LFN with dynamic working buffer on the STACK.
va009039 0:ad2b1fc04955 101 / 3: Enable LFN with dynamic working buffer on the HEAP.
va009039 0:ad2b1fc04955 102 /
va009039 0:ad2b1fc04955 103 / The LFN working buffer occupies (_MAX_LFN + 1) * 2 bytes. To enable LFN,
va009039 0:ad2b1fc04955 104 / Unicode handling functions ff_convert() and ff_wtoupper() must be added
va009039 0:ad2b1fc04955 105 / to the project. When enable to use heap, memory control functions
va009039 0:ad2b1fc04955 106 / ff_memalloc() and ff_memfree() must be added to the project. */
va009039 0:ad2b1fc04955 107
va009039 0:ad2b1fc04955 108
va009039 0:ad2b1fc04955 109 #define _LFN_UNICODE 0 /* 0:ANSI/OEM or 1:Unicode */
va009039 0:ad2b1fc04955 110 /* To switch the character code set on FatFs API to Unicode,
va009039 0:ad2b1fc04955 111 / enable LFN feature and set _LFN_UNICODE to 1. */
va009039 0:ad2b1fc04955 112
va009039 0:ad2b1fc04955 113
va009039 0:ad2b1fc04955 114 #define _FS_RPATH 0 /* 0 to 2 */
va009039 0:ad2b1fc04955 115 /* The _FS_RPATH option configures relative path feature.
va009039 0:ad2b1fc04955 116 /
va009039 0:ad2b1fc04955 117 / 0: Disable relative path feature and remove related functions.
va009039 0:ad2b1fc04955 118 / 1: Enable relative path. f_chdrive() and f_chdir() are available.
va009039 0:ad2b1fc04955 119 / 2: f_getcwd() is available in addition to 1.
va009039 0:ad2b1fc04955 120 /
va009039 0:ad2b1fc04955 121 / Note that output of the f_readdir fnction is affected by this option. */
va009039 0:ad2b1fc04955 122
va009039 0:ad2b1fc04955 123
va009039 0:ad2b1fc04955 124
va009039 0:ad2b1fc04955 125 /*---------------------------------------------------------------------------/
va009039 0:ad2b1fc04955 126 / Physical Drive Configurations
va009039 0:ad2b1fc04955 127 /----------------------------------------------------------------------------*/
va009039 0:ad2b1fc04955 128
va009039 0:ad2b1fc04955 129 #define _VOLUMES 1
va009039 0:ad2b1fc04955 130 /* Number of volumes (logical drives) to be used. */
va009039 0:ad2b1fc04955 131
va009039 0:ad2b1fc04955 132
va009039 0:ad2b1fc04955 133 #define _MAX_SS 512 /* 512, 1024, 2048 or 4096 */
va009039 0:ad2b1fc04955 134 /* Maximum sector size to be handled.
va009039 0:ad2b1fc04955 135 / Always set 512 for memory card and hard disk but a larger value may be
va009039 0:ad2b1fc04955 136 / required for on-board flash memory, floppy disk and optical disk.
va009039 0:ad2b1fc04955 137 / When _MAX_SS is larger than 512, it configures FatFs to variable sector size
va009039 0:ad2b1fc04955 138 / and GET_SECTOR_SIZE command must be implememted to the disk_ioctl function. */
va009039 0:ad2b1fc04955 139
va009039 0:ad2b1fc04955 140
va009039 0:ad2b1fc04955 141 #define _MULTI_PARTITION 0 /* 0:Single partition, 1/2:Enable multiple partition */
va009039 0:ad2b1fc04955 142 /* When set to 0, each volume is bound to the same physical drive number and
va009039 0:ad2b1fc04955 143 / it can mount only first primaly partition. When it is set to 1, each volume
va009039 0:ad2b1fc04955 144 / is tied to the partitions listed in VolToPart[]. */
va009039 0:ad2b1fc04955 145
va009039 0:ad2b1fc04955 146
va009039 0:ad2b1fc04955 147 #define _USE_ERASE 0 /* 0:Disable or 1:Enable */
va009039 0:ad2b1fc04955 148 /* To enable sector erase feature, set _USE_ERASE to 1. CTRL_ERASE_SECTOR command
va009039 0:ad2b1fc04955 149 / should be added to the disk_ioctl functio. */
va009039 0:ad2b1fc04955 150
va009039 0:ad2b1fc04955 151
va009039 0:ad2b1fc04955 152
va009039 0:ad2b1fc04955 153 /*---------------------------------------------------------------------------/
va009039 0:ad2b1fc04955 154 / System Configurations
va009039 0:ad2b1fc04955 155 /----------------------------------------------------------------------------*/
va009039 0:ad2b1fc04955 156
va009039 0:ad2b1fc04955 157 #define _WORD_ACCESS 0 /* 0 or 1 */
va009039 0:ad2b1fc04955 158 /* Set 0 first and it is always compatible with all platforms. The _WORD_ACCESS
va009039 0:ad2b1fc04955 159 / option defines which access method is used to the word data on the FAT volume.
va009039 0:ad2b1fc04955 160 /
va009039 0:ad2b1fc04955 161 / 0: Byte-by-byte access.
va009039 0:ad2b1fc04955 162 / 1: Word access. Do not choose this unless following condition is met.
va009039 0:ad2b1fc04955 163 /
va009039 0:ad2b1fc04955 164 / When the byte order on the memory is big-endian or address miss-aligned word
va009039 0:ad2b1fc04955 165 / access results incorrect behavior, the _WORD_ACCESS must be set to 0.
va009039 0:ad2b1fc04955 166 / If it is not the case, the value can also be set to 1 to improve the
va009039 0:ad2b1fc04955 167 / performance and code size.
va009039 0:ad2b1fc04955 168 */
va009039 0:ad2b1fc04955 169
va009039 0:ad2b1fc04955 170
va009039 0:ad2b1fc04955 171 /* A header file that defines sync object types on the O/S, such as
va009039 0:ad2b1fc04955 172 / windows.h, ucos_ii.h and semphr.h, must be included prior to ff.h. */
va009039 0:ad2b1fc04955 173
va009039 0:ad2b1fc04955 174 #define _FS_REENTRANT 0 /* 0:Disable or 1:Enable */
va009039 0:ad2b1fc04955 175 #define _FS_TIMEOUT 1000 /* Timeout period in unit of time ticks */
va009039 0:ad2b1fc04955 176 #define _SYNC_t HANDLE /* O/S dependent type of sync object. e.g. HANDLE, OS_EVENT*, ID and etc.. */
va009039 0:ad2b1fc04955 177
va009039 0:ad2b1fc04955 178 /* The _FS_REENTRANT option switches the reentrancy (thread safe) of the FatFs module.
va009039 0:ad2b1fc04955 179 /
va009039 0:ad2b1fc04955 180 / 0: Disable reentrancy. _SYNC_t and _FS_TIMEOUT have no effect.
va009039 0:ad2b1fc04955 181 / 1: Enable reentrancy. Also user provided synchronization handlers,
va009039 0:ad2b1fc04955 182 / ff_req_grant, ff_rel_grant, ff_del_syncobj and ff_cre_syncobj
va009039 0:ad2b1fc04955 183 / function must be added to the project. */
va009039 0:ad2b1fc04955 184
va009039 0:ad2b1fc04955 185
va009039 0:ad2b1fc04955 186 #define _FS_LOCK 0 /* 0:Disable or >=1:Enable */
va009039 0:ad2b1fc04955 187 /* To enable file lock control feature, set _FS_LOCK to 1 or greater.
va009039 0:ad2b1fc04955 188 The value defines how many files can be opened simultaneously. */
va009039 0:ad2b1fc04955 189
va009039 0:ad2b1fc04955 190
va009039 0:ad2b1fc04955 191 #endif /* _FFCONFIG */