Code from liamg with few edits to init seria comml and output counter.
Fork of MKL05CLK by
main.cpp
- Committer:
- donoman
- Date:
- 2014-04-11
- Revision:
- 2:1328c14aca66
- Parent:
- 1:dc4a581c6c4a
- Child:
- 3:985a40825e8d
File content as of revision 2:1328c14aca66:
#include "mbed.h" #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"); } }