Code from liamg with few edits to init seria comml and output counter.
Fork of MKL05CLK by
Diff: main.cpp
- Revision:
- 2:1328c14aca66
- Parent:
- 1:dc4a581c6c4a
- Child:
- 3:985a40825e8d
diff -r dc4a581c6c4a -r 1328c14aca66 main.cpp --- a/main.cpp Fri Apr 04 23:41:54 2014 +0000 +++ b/main.cpp Fri Apr 11 02:34:27 2014 +0000 @@ -2,29 +2,48 @@ #include "head.h" Serial pc(USBTX, USBRX); // tx, rx for debug terminal +Serial testOut(PTC4,PTC3); DigitalOut myled(LED1); int main() { int cycle = 0; + PORTC_PCR3=0x501; + SIM_SOPT2=0x4010080; while(true){ pc.baud(9600); - + myled = 1; wait(0.2); myled = 0; wait(0.2); unsigned int ID=0; + unsigned int FU=0; + unsigned int FU2=0; + unsigned int FU_TIM=0; cycle++; ID=SIM_SDID; + FU=SIM_SOPT2; + // PORTC_PCR3=0x501; + FU2=PORTC_PCR3; + FU_TIM=MCG_C1; + + pc.printf("Kinetis ID = %x \n",ID); + pc.printf("SIM_SOPT2 = %x \n",FU); + pc.printf("PORTC_PCR3 = %x \n",FU2); + pc.printf("MCG_C1 = %x \n",FU_TIM); + pc.printf("CycleNo = %d \n", cycle); + + //testOut.printf("FUCKKK"); } } +