Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
ID.cpp@4:8046ba0a87b5, 2011-09-30 (annotated)
- Committer:
- daugihao
- Date:
- Fri Sep 30 09:16:45 2011 +0000
- Revision:
- 4:8046ba0a87b5
- Parent:
- 3:eb6d9211592d
- Child:
- 5:6134277e4d57
Added extra chip
Who changed what in which revision?
| User | Revision | Line number | New contents of line | 
|---|---|---|---|
| daugihao | 0:15536fa79743 | 1 | #include "mbed.h" | 
| daugihao | 0:15536fa79743 | 2 | #include "LPC.h" | 
| daugihao | 0:15536fa79743 | 3 | //Function to document the relevant information on LPC chips to load onto | 
| daugihao | 0:15536fa79743 | 4 | int SerialBuffered::IDCheck(int idcode) { | 
| daugihao | 0:15536fa79743 | 5 | switch (idcode) { | 
| daugihao | 4:8046ba0a87b5 | 6 | |
| daugihao | 0:15536fa79743 | 7 | //Cortex M3 - LPC17xx | 
| daugihao | 0:15536fa79743 | 8 | case 637615927: | 
| daugihao | 1:0872c208795f | 9 | strcpy(strChipType, "LPC1768 - Cortex M3"); //Chip name | 
| daugihao | 1:0872c208795f | 10 | lastSector = 29; //Last available sector in Flash | 
| daugihao | 1:0872c208795f | 11 | RAM = 268435968; //First RAM address | 
| daugihao | 3:eb6d9211592d | 12 | strcpy(speed, "4000"); //Chip speed | 
| daugihao | 0:15536fa79743 | 13 | break; | 
| daugihao | 4:8046ba0a87b5 | 14 | |
| daugihao | 4:8046ba0a87b5 | 15 | case 1023410219: | 
| daugihao | 4:8046ba0a87b5 | 16 | strcpy(strChipType, "LPC1343 - ARM7"); //Can run up to 115200 baud | 
| daugihao | 4:8046ba0a87b5 | 17 | lastSector = 27; | 
| daugihao | 4:8046ba0a87b5 | 18 | RAM = 0x40000200; | 
| daugihao | 4:8046ba0a87b5 | 19 | strcpy(speed, "4000"); | 
| daugihao | 4:8046ba0a87b5 | 20 | break; | 
| daugihao | 4:8046ba0a87b5 | 21 | |
| daugihao | 1:0872c208795f | 22 | //ARM7 | 
| daugihao | 1:0872c208795f | 23 | case 117702437: | 
| daugihao | 1:0872c208795f | 24 | strcpy(strChipType, "LPC2387 - ARM7"); | 
| daugihao | 1:0872c208795f | 25 | lastSector = 27; | 
| daugihao | 1:0872c208795f | 26 | RAM = 0x40000200; | 
| daugihao | 4:8046ba0a87b5 | 27 | strcpy(speed, "4000"); | 
| daugihao | 0:15536fa79743 | 28 | break; | 
| daugihao | 0:15536fa79743 | 29 | |
| daugihao | 0:15536fa79743 | 30 | default: | 
| daugihao | 0:15536fa79743 | 31 | strcpy(strChipType, "\n\rUnrecognised chip! Please add into the \"CheckTargetPresent\" function the chip's relevant information.\r\n\n"); | 
| daugihao | 1:0872c208795f | 32 | return(2); | 
| daugihao | 0:15536fa79743 | 33 | } | 
| daugihao | 0:15536fa79743 | 34 | return 0; | 
| daugihao | 0:15536fa79743 | 35 | } |