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.
Fork of MKL05CLK by
main.cpp
00001 //#include "mbed.h" 00002 #include "head.h" 00003 00004 //Serial pc(USBTX, USBRX); // tx, rx for debug terminal 00005 //Serial testOut(PTC4,PTC3); 00006 //DigitalOut myled(LED1); 00007 00008 00009 int main() { 00010 00011 int cycle = 0; 00012 00013 SIM_SOPT2=0x4010080; 00014 MCG_C2=0x25; //fast clock slow clock 00015 MCG_SC=0x04; //divider 00016 00017 SIM_SCGC5=0xF81; 00018 PORTC_PCR3=0x501; 00019 00020 while(true){ 00021 // pc.baud(9600); 00022 00023 // myled = 1; 00024 // wait(0.2); 00025 // myled = 0; 00026 // wait(0.2); 00027 00028 unsigned int ID=0; 00029 unsigned int FU=0; 00030 unsigned int FU2=0; 00031 unsigned char FU_TIM=0; 00032 unsigned int FU_MAN=0; 00033 cycle++; 00034 00035 ID=SIM_SDID; 00036 FU=SIM_SOPT2; 00037 00038 //FU2=PORTC_PCR3; 00039 //MCG_C1=0x3c; 00040 00041 FU_TIM=MCG_C2; 00042 FU_MAN=SIM_SCGC5; 00043 00044 00045 //pc.printf("Kinetis ID = %x \n",ID); 00046 //pc.printf("SIM_SOPT2 = %x \n",FU); 00047 //pc.printf("PORTC_PCR3 = %x \n",FU2); 00048 //pc.printf("MCG_C2 = %x \n",FU_TIM); 00049 //pc.printf("SIM_SCGC5 = %x \n",FU_MAN); 00050 00051 //pc.printf("CycleNo = %d \n", cycle); 00052 00053 //testOut.printf("FUCKKK"); 00054 } 00055 00056 00057 00058 } 00059
Generated on Sat Aug 13 2022 12:24:38 by
1.7.2
