William Reynolds
/
LPC_Bootloader
Embed:
(wiki syntax)
Show/hide line numbers
ID.cpp
00001 #include "mbed.h" 00002 #include "LPC.h" 00003 //Function to document the relevant information on LPC chips to load onto 00004 int SerialBuffered::IDCheck(int idcode) { 00005 switch (idcode) { 00006 00007 //Cortex M3 - LPC17xx 00008 case 637615927://Works //ID code 00009 strcpy(strChipType, "LPC1768 - Cortex M3"); //Chip name 00010 //MAX 230400 baud //Maximum baud rate 00011 lastSector = 29; //Last available sector in Flash 00012 RAM = 0x10000200; //First RAM address 00013 strcpy(speed, "4000"); //Chip speed 00014 break; 00015 00016 case 1023410219://Looking at the user manual to solve problems 00017 strcpy(strChipType, "LPC1343 - Cortex M3"); 00018 //MAX 115200 baud 00019 lastSector = 7; 00020 RAM = 0x10000000; 00021 strcpy(speed, "60000"); 00022 break; 00023 00024 case 71569451://Looking at the user manual to solve problems 00025 strcpy(strChipType, "LPC1114 - Cortex M3"); 00026 //MAX 115200 baud 00027 lastSector = 7; 00028 RAM = 0x10000000; 00029 strcpy(speed, "4000"); 00030 break; 00031 00032 //ARM7 00033 case 117702437://Works 00034 //MAX 230400 00035 strcpy(strChipType, "LPC2387 - ARM7"); 00036 lastSector = 27; 00037 RAM = 0x40000200; 00038 strcpy(speed, "4000"); 00039 break; 00040 00041 default: 00042 strcpy(strChipType, "\n\rUnrecognised chip! Please add into the \"CheckTargetPresent\" function the chip's relevant information.\r\n\n"); 00043 return(2); 00044 } 00045 return 0; 00046 }
Generated on Tue Jul 19 2022 22:34:47 by 1.7.2