Dependencies:   mbed

Committer:
daugihao
Date:
Fri Sep 30 14:55:11 2011 +0000
Revision:
7:d0f98d61ec4c
Parent:
5:6134277e4d57
Some slight alterations and comment addition

Who changed what in which revision?

UserRevisionLine numberNew 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 7:d0f98d61ec4c 8 case 637615927://Works //ID code
daugihao 1:0872c208795f 9 strcpy(strChipType, "LPC1768 - Cortex M3"); //Chip name
daugihao 7:d0f98d61ec4c 10 //MAX 230400 baud //Maximum baud rate
daugihao 1:0872c208795f 11 lastSector = 29; //Last available sector in Flash
daugihao 7:d0f98d61ec4c 12 RAM = 0x10000200; //First RAM address
daugihao 3:eb6d9211592d 13 strcpy(speed, "4000"); //Chip speed
daugihao 0:15536fa79743 14 break;
daugihao 4:8046ba0a87b5 15
daugihao 7:d0f98d61ec4c 16 case 1023410219://Looking at the user manual to solve problems
daugihao 7:d0f98d61ec4c 17 strcpy(strChipType, "LPC1343 - Cortex M3");
daugihao 7:d0f98d61ec4c 18 //MAX 115200 baud
daugihao 5:6134277e4d57 19 lastSector = 7;
daugihao 5:6134277e4d57 20 RAM = 0x10000000;
daugihao 7:d0f98d61ec4c 21 strcpy(speed, "60000");
daugihao 5:6134277e4d57 22 break;
daugihao 5:6134277e4d57 23
daugihao 7:d0f98d61ec4c 24 case 71569451://Looking at the user manual to solve problems
daugihao 7:d0f98d61ec4c 25 strcpy(strChipType, "LPC1114 - Cortex M3");
daugihao 7:d0f98d61ec4c 26 //MAX 115200 baud
daugihao 5:6134277e4d57 27 lastSector = 7;
daugihao 5:6134277e4d57 28 RAM = 0x10000000;
daugihao 4:8046ba0a87b5 29 strcpy(speed, "4000");
daugihao 4:8046ba0a87b5 30 break;
daugihao 4:8046ba0a87b5 31
daugihao 1:0872c208795f 32 //ARM7
daugihao 7:d0f98d61ec4c 33 case 117702437://Works
daugihao 7:d0f98d61ec4c 34 //MAX 230400
daugihao 1:0872c208795f 35 strcpy(strChipType, "LPC2387 - ARM7");
daugihao 1:0872c208795f 36 lastSector = 27;
daugihao 1:0872c208795f 37 RAM = 0x40000200;
daugihao 4:8046ba0a87b5 38 strcpy(speed, "4000");
daugihao 0:15536fa79743 39 break;
daugihao 0:15536fa79743 40
daugihao 0:15536fa79743 41 default:
daugihao 0:15536fa79743 42 strcpy(strChipType, "\n\rUnrecognised chip! Please add into the \"CheckTargetPresent\" function the chip's relevant information.\r\n\n");
daugihao 1:0872c208795f 43 return(2);
daugihao 0:15536fa79743 44 }
daugihao 0:15536fa79743 45 return 0;
daugihao 0:15536fa79743 46 }